Commit Graph

18 Commits (master)
 

Author SHA1 Message Date
Avril b7f3249180
Update README for a section on `Semaphore` (semaphore.js).
2 years ago
Avril 7b438a930f
Merge branch 'allow-await-async-timeout-func'
2 years ago
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 77926dd1f9
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 b2070f1918
Semaphore: Better example function. Changed `Semaphore.Mutex()` -> `Semaphore.mutex()` to avoid class naming convention confusion.
2 years ago
Avril caad3ce5b6
Merged `Semaphore` from master
2 years ago
Avril d54a5e8f51 Uhh, fixed semaphore. It works now.
2 years ago
Avril d151412576
WHY DOESN"T THIS FUKCINGA I STUPID THING WORK????? RESOLVE IS ***PROVEN*** TO ____NOT____ BE CALLED IN THE PROMISE CTOR SO WHY THE FUCK IS THAT PROMISE RESOLVING IMMEDIATELY!??!?!?!??!???!??!??!?!?!?!?
2 years ago
Avril bc64ae9232
semaphore attampt 1: failure
2 years ago
Avril 4f9c541715
Changed `exmaple()` to `console.log()` instead of `alert()`.
2 years ago
Avril ed32e1586b
Changed `exmaple()` to `console.log()` instead of `alert()`.
2 years ago
Avril e58db0b0b9
Fix syntax error
2 years ago
Avril 881be9a6e7
Fix syntax error
2 years ago
Avril e01d0d8534
Update README
2 years ago
Avril 05daa18891
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