Auto-translated
Hello!
I have a question for mapmakers and script writers regarding the `startThread` function – is there a desirable number of open threads, and if exceeded, could the game freeze?
The thing is, I'm running some checks not through triggers, but in separate threads, and I'm worried that this might cause the game to crash. I had a situation where the game froze after launching a function in a separate thread. I then added sleeps at the beginning and end of the function, but the concern that the game might still freeze remains.
Those who have experience using `startThread` – have you encountered cases where functions running in separate threads caused the game to freeze, and if so, how did you resolve them? Also, on average, how many additional threads were running simultaneously on your maps?
If needed, all my functions that are launched in separate threads currently look like this:
function doSomeChecks()
while (1) do
sleep(10)
--some code
if (condition) then
--some code
break
end
sleep(10)
end
end