sendai escribió: ↑25 Ene 2020 05:24
This is good plugin.. but any chance to make the pagetimer or even loop (for loop, do while) can still work while dialogeX is open?
This time the command mentioned is not work if dialogex is open.
Any update if there? thank you pabloko
this can do something with dialogex:
http://amsspecialist.com/viewtopic.php? ... gex#p40078
--------
Well i wrote this plugin in 2010, and i never fully explained the perks of multithreading on ams, so i will write some bits now...
First of all, ams codebase is wrote in a way that most of its actions arent thread safe, or they are under determinated circumstances, thats said, lua itself isnt thread safe, so this plugin is particularly unsafe to use campared with others (lanes, mt...) if you dont apply the same logic that applies when building thread safe apps with unsafe codebase, you will need to use mutex and locks to prevent fucking up the lua stack or certain ams callback, you must prevent executing api that modify same internal objects on different threads at the same time.
How do you know what api changes internal objects? without the source is hard to tell, so its better assume every api is unsafe here.
So, how its useful this plugin?? Well, it wasnt designed for running threads of code that does anything it want, the real propourse was to spawn a specific task that could be done without blocking the UI, then exchanging this info with UI thread, for example querying a big database or doing http usage.
Otherwise, you will never achive for example simultaneous HTTP usage for example with included AMS api, because AMS api has internal objects written in a way that if you try to run it on parallel internal data will corrupt and crash. This is something unfixeable from a plugin that requires to write a lot of thread safe api to use instead.