Closed jbpuryear closed 2 years ago
Thanks for the report!
It is weird, I never had this issue.
But ok, your change seems very reasonable, always cleanly stopping the thread before exiting.
I will try to implement it, thank you!
Ok, so instead of freezing I was getting the error "There are still MemoryPool allocs in use at exit!"
I was wondering what was causing that error, thank you very much for the fix! I committed the change, but there is not enough change for a new release I think.
Thank you! Joël
I should have mentioned I'm running Linux, which is probably why it's freezing for me and not you. Also, I later realized that it's not actually necessary to set auto_accept_quit to false and call get_tree().quit(). It's enough to just exit the thread when receiving the quit notification.
cool, I updated the code
When trying to quit by closing the demo's window, it will freeze and refuse to exit if the background loader is running. Calling
get_tree().set_auto_accept_quit(false)
and adding the following method to BackgroundLoader appears to fix the issue.