Commit Graph

8 Commits (d6f9ff78177752396b11ceb31437a23e8af855e1)
 

Author SHA1 Message Date
Avril d6f9ff7817
AsyncTimeout: Now handles async functions for `thing` correctly. Improved `timeout_example(_timeout, cancel)` (+ `Cancellation` class for async cancellations). Added `try_example(time)` which runs the default example and cancels after `time`, returning the value or error in an object containing either `{ value: true }` or `{ error: <caught error> }` when awaited.
3 years ago
Avril 0d9f2adb04
Semaphore: Added `try_acquire()`, `try_using()` (see docs). Added `bind_using(func)` to returned a bound function of `func` to `this.using`.
3 years ago
Avril caad3ce5b6
Merged `Semaphore` from master
3 years ago
Avril 4f9c541715
Changed `exmaple()` to `console.log()` instead of `alert()`.
3 years ago
Avril e58db0b0b9
Fix syntax error
3 years ago
Avril e01d0d8534
Update README
3 years ago
Avril f9f85f36e1
Failed attempt at allowing async functions to be passed as `thing`: This will need a complete redesign to support this and I don"t care enough right now to do it.
3 years ago
Avril 66a5c7cc05
Initial commit
3 years ago