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 If you using a Function in Multiple Threads main script must be in 1 thread 1 success 1 fail. 1 thread - is a servise thread. You can't use threads in main function.0_1519563200997_test.rar
-
@seedgg Cannot agree with you. We can have any number of "service" threads (or "seed" threads). In this regard, @bogdan made it alright. You need just arrange proper control over how seeds and workers spawn and die.
-
@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 !
-
@daemons Могу ли я взглянуть на пример скрипта, чтобы лучше разобраться. Так как я столкнулся с подобной делемой, и пока нашел для себя такое решение.
-
@seedgg Sure. Refer to this my post: http://community.bablosoft.com/topic/3776/calling-different-function-in-threads/14#
Feel free to upvote every post that helps, that would help both me and the community.
-
@daemons Спасибо за пример. Но если заменить в примерочном скрипте функцию - на Функцию в несколько потоков, а не просто одну функцию....бас будет крашится
-
@seedgg Я постараюсь сделать минимальный тестовый скрипт в ближайшее время. Немного посвободнее станет, и возьмусь. Пока скажу, что у меня успешно работают несколько проектов с многими многопоточными функциями, одни из которых подкидывают работу другим.