runs
A simple run loop.
install
npm install runs --save
usage
var r = rrr r
API
createRuns = require('runs')
runs = createRuns([customQueue])
customQueue
{Function} A function for custom handling on how tasks get queued.
runs.andThen(task)
Schedule a synchronous task in the run loop.
runs.wait()
Schedule the run loop to wait for a subsequent resume()
call.
runs.resume()
Tell the run loop to resume running tasks.
runs.cancel()
Tell the run loop to cancel the current run.
runs.run([done])
Start running the tasks queued and call a done
function when all tasks have
finished.
License
Copyright (c) 2015 Kyle Robinson Young
Licensed under the MIT license.