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
From other proposals we have isFramePending and isInputPending however it would also be useful to have a more general isTaskPending which returns true if any task of higher priority is scheduled to run. This would also include tasks created by the browser, i.e. isInputPending() and isFramePending() would both imply isTaskPending().
The usage would be similar to is{Input,Frame}Pending:
awaitscheduler.postTask(asyncfunctioncreateNoiseTexture(){consttexture=newTexture(1000,1000);for(letx=0;i<texture.width;x+=1){for(lety=0;i<texture.height;x+=1){// Allow any higher priority tasks to run, or frame tasks// or input tasks as well (and possibly other browser tasks as well)if(scheduler.isTaskPending("background")){awaitscheduler.yield("background");}texture.setPixel(x,y,generateNoiseRGB());}}},{priority: "background"});
The text was updated successfully, but these errors were encountered:
From other proposals we have
isFramePending
andisInputPending
however it would also be useful to have a more generalisTaskPending
which returnstrue
if any task of higher priority is scheduled to run. This would also include tasks created by the browser, i.e.isInputPending()
andisFramePending()
would both implyisTaskPending()
.The usage would be similar to
is{Input,Frame}Pending
:The text was updated successfully, but these errors were encountered: