-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
Following #212, the current implementation for Sprite.wait will busy-wait if no other active threads are requesting a screen refresh.
Our Sprite.wait is (loosely?) modeled after scratch-vm: wait, stack timer, Timer.
If it's possible to implement "wait" in terms of a promise, this would avoid busy-waiting. However, we obviously need to retain behavior semantics, i.e. not break any existing behavior.
I don't know if there have been any previous efforts or discussion, particularly in scratch-vm, to implement "wait" in terms of a promise (and thus consideration of compatibility concerns). We did a cursory look for pull requests and didn't spot anything, but it might be worth a closer look!
Metadata
Metadata
Assignees
Labels
No labels