Here's a suggestion:
Mark the time when starting the thread.
Then during the script run, add a time check action and compare the time difference with your desired value.
-> Take appropriate action.
BUG ? Calling Function in Multiple Threads ?
-
I've made an example of the script.
At some point when the script is running the software crashes.
Where do you think is the problem , am i doing something wrong or this is a bug ?0_1519559805722_Call Threads Ex.xml -
@bogdan I guess, you still have a chance to take a look at my example script.
What you can observe when your script is running is usually a symptom of something taking all CPU so that the main BAS processing loop is unable to take control for a single tick of time.
I can assume that the reason is seed and worker threads respawning. My script had special guards implemented for this. You've totally neglected that part.
So back to the drawing board !
-
@seedgg Я постараюсь сделать минимальный тестовый скрипт в ближайшее время. Немного посвободнее станет, и возьмусь. Пока скажу, что у меня успешно работают несколько проектов с многими многопоточными функциями, одни из которых подкидывают работу другим.