darkxor Posted April 22, 2016 Share Posted April 22, 2016 Is multithreading supported by osbot? I want to make handler that runs in separate thread and able to take control of bot (input) when needed. It should pause execution of main script logic and interrupt current input call. Anybody have experience in making such things for osbot? Quote Link to comment Share on other sites More sharing options...
FrostBug Posted April 22, 2016 Share Posted April 22, 2016 (edited) That sounds like a pain, you'd be better off synchronizing it. Should be possible tho EDIT: could do something like.. use separate thread to interrupt current loop, and set some variable. Next loop the main thread looks at that variable and performs whatever action it suggests? Edited April 22, 2016 by FrostBug 1 Quote Link to comment Share on other sites More sharing options...
darkxor Posted April 22, 2016 Author Share Posted April 22, 2016 (edited) Hmm... yeah can try this way. Executing all input in bot thread should be better than executing in different threads. Is enumerating objects / reading game states thread-safe? I'm worried mostly about possibility of interrupting input calls and thread safety of querying objects / game data. Edited April 22, 2016 by darkxor Quote Link to comment Share on other sites More sharing options...
hansen19498 Posted April 29, 2016 Share Posted April 29, 2016 (edited) Before. I try to write rs13, is to use multiple threads, the effect is very good, (using another language). I really like osbot, but I do not know how to implement multiple threads in osbot, I was soon to learn For example, in the process of taking, you must go event handling, rather than go through the whole process, was carried out, the next mouse plan can be achieved, Edited April 29, 2016 by hansen19498 Quote Link to comment Share on other sites More sharing options...