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
{{ message }}
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
Given generator's (two-way) coroutine design was designed in order to enable custom runners it would be good to have some runner built on top of IdleValue that can simplify writing.
Simple example:
constsize=width*height*4constimageData=newUint8Array(size)// Just a simple whitenoise image generatorreturnnewIdleTask(function*(){for(leti=0;i<size;i++){// Allow scheduler to break this up as much as it needsyieldimageData[i]=Math.floor(Math.random()*256)}returnimageData})
Example implementation of IdleTask (doesn't handle things like const value = yield anotherIdleValue or other stuff like that though):
Given generator's (two-way) coroutine design was designed in order to enable custom runners it would be good to have some runner built on top of
IdleValue
that can simplify writing.Simple example:
Example implementation of
IdleTask
(doesn't handle things likeconst value = yield anotherIdleValue
or other stuff like that though):The text was updated successfully, but these errors were encountered: