You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently microtasks aren't considered when iterating through time. Timeweb currently iterates through time in a loop, which doesn't allow for queued microtasks to run.
Describe the solution you'd like
It may be useful if processNextBlock used recursive calls to queueMicrotask, so if any of the functions run with setTimeout/setInterval that queue microtasks would run before the next iteration timeouts/intervals. Also it's worth considering whether other sequential parts of timeweb should relinquish to microtasks (events, requestAnimationFrame)
Describe alternatives you've considered
None.
More Considerations
Microtasks may also be useful when trying to save webgl canvas data before it becomes stale, though I'm not sure about hte lifecycle of canvas data.
Is your feature request related to a problem? Please describe.
Currently microtasks aren't considered when iterating through time. Timeweb currently iterates through time in a loop, which doesn't allow for queued microtasks to run.
Describe the solution you'd like
It may be useful if
processNextBlock
used recursive calls toqueueMicrotask
, so if any of the functions run withsetTimeout
/setInterval
that queue microtasks would run before the next iteration timeouts/intervals. Also it's worth considering whether other sequential parts of timeweb should relinquish to microtasks (events, requestAnimationFrame)Describe alternatives you've considered
None.
More Considerations
Microtasks may also be useful when trying to save webgl canvas data before it becomes stale, though I'm not sure about hte lifecycle of canvas data.
Additional context
queueMicrotask
APIGuide to Microtasks
The text was updated successfully, but these errors were encountered: