Commit Graph

8 Commits (allow-await-async-timeout-func)
 

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.
2 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`.
2 years ago
Avril caad3ce5b6
Merged `Semaphore` from master
2 years ago
Avril 4f9c541715
Changed `exmaple()` to `console.log()` instead of `alert()`.
2 years ago
Avril e58db0b0b9
Fix syntax error
2 years ago
Avril e01d0d8534
Update README
2 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.
2 years ago
Avril 66a5c7cc05
Initial commit
2 years ago