Skip to content

Current questions and answers regarding the map editor.

User Avatar
#5972
Auto-translated
IchGViji
Hello!
I have a question for those who create maps and scripts regarding the startThread function: is there a desirable number of open threads, and if it is exceeded, can the game freeze?
I haven't heard of any specific limitations. I don't know what checks are required in your case, but I would try to replace several threads with separate checks with sequential checks in one thread, if possible, as this would be more reliable.
IchGViji
For those who have used startThread, have you encountered cases where functions freeze in a separate thread, and if so, how did you resolve them? Also, on average, how many additional threads were running at the same time on your maps?
I only used startThread once (I needed to call a function each time the hero gains experience), and it worked well; I used sleep(5). Freezing is possible due to an infinite loop (somewhere in the --some code)?