Hi @ClearScriptLib ,
I have a question regarding to follow code,
Does this mean that, without an exit signal(a call to PostExit or an exception in any of the event handlers), this message loop will spin forever, even the message queue is empty, and the main script has finished execution? Further more, since the loop is started with Task.Run, does it mean that a thread from thread pool is long running and not going to be released?
In most cases, the script will not make any "exit call" to the message loop implementation like the "Game.js" does here, they simply quit when they done their job. In that case, as you started more workers, you end up with a lot of thread pool threads doing nothing their but spinning. Please correct me if I was wrong?
Thank you.