Files: 2d384c9d532ddc23ea6089a835bb4b338df7bd85 / docs / scheduler.md
3161 bytesRaw
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
Table of Contents
constructor
The Sceduler manages the run cycle of the containes and figures out which order they should run in
getLock
locks the scheduler from clearing waits untill the lock is resolved
Parameters
id
string
Returns function the resolve function to call once it to unlock
update
updates an instance with a new tick count
Parameters
instance
Object a container instance
getInstance
returns a container
Parameters
id
string
Returns object
done
deletes an instance from the scheduler
Parameters
id
string the containers id
wait
returns a promise that resolves once all containers have reached the given number of ticks
Parameters
ticks
interger the number of ticks to wait (optional, defaultInfinity
)id
string optional id of the container that is waiting
Returns Promise
leastNumberOfTicks
returns the oldest container's ticks
Returns integer
Built with git-ssb-web