Files: 391c4a37244278cb64547f788593269dc60b283a / docs / scheduler.md
3123 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
oldest
returns the oldest container's ticks
Returns integer
Built with git-ssb-web