gocsp-timeout
0.0.1 • Public • Published gocsp-timeout
Timeout timer
Usage
var go = require('gocsp-go')
var select = require('gocsp-select')
var timeout = require('gocsp-timeout')
go(function* () {
yield timeout(1000)
yield select(function (s) {
s(go(function* () {
yield timeout(50)
}), function () {
console.log('should reach here')
})
||
s(timeout(100), function () {
console.log('should not reach here')
})
})
})
License
MIT
/gocsp-timeout/
//
Package Sidebar
Install
Weekly Downloads