-
-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mainloop terminating unintentionally #10682
Comments
I think in Browser JS, MainLoop should never reall "exit" because you might have some other source of events (like in our case). |
Ping @RealyUniqueName : this used to work before MainLoop changes in ~4.2 |
The change causes some threads tests to fail:
|
@RealyUniqueName @ncannasse I would appreciate if you could sort out this failing test because I'm not familiar with this code at all. This currently makes our CI red. |
This issue is from Heaps originally, and as requested, is moved here.
Original issues HeapsIO/heaps#1068
---- copied from heaps issue
minimum code https://github.com/ZwodahS/heaps-sound-bug
OS : Mac
heaps version: 57c1bd34779193636562621faca5a875b2113923
haxe: 4.2.4
SoundManager set isBlocking to false.
https://github.com/HeapsIO/heaps/blob/master/hxd/snd/Manager.hx#L151
Main loop cancel the event and only adds it back when there is a blocking event.
https://github.com/HaxeFoundation/haxe/blob/development/std/haxe/MainLoop.hx#L81-L89
https://github.com/HaxeFoundation/haxe/blob/development/std/haxe/MainLoop.hx#L124
This is fine when live update is set to true
hxd.res.Resource.LIVE_UPDATE = true;
(suspect that the live update created a blocking main event) or when you have mainEvent elsewhere.with that, there is 2 solutions that I found that works
https://github.com/ZwodahS/heaps-sound-bug/blob/main/App.hx#L4-L5
However, I am curious as to what is the best way to handle this, and if this is considered a bug.
The text was updated successfully, but these errors were encountered: