Hacker GitHub

← All repos

mitranim/posterus

View on GitHub ↗ ★ 544 JavaScript

Composable async primitives with cancelation, control over scheduling, and coroutines. Superior replacement for JS Promises.

9 mentions on Hacker News by 2 people: 1 story, 8 comments · first 2017-08-08 · latest 2022-04-16

Mentions per year 9 mentions · busiest year 2017 (6)
20082026
  1. …I haven't learned Rust but apparently the author bases this on Rust's ownership principle. [0] https://github.com/mitranim/posterus
    comment by imbnwa · 2022-04-16 · in I Avoid Async/Await
  2. …because I can opt-in and out of, as well as control, or simply replace, the scheduler[0] [0] https://github.com/mitranim/posterus
    comment by imbnwa · 2021-10-19 · in Why I Hate Frameworks (2005)
  3. Maybe A+ promises are the wrong abstraction https://github.com/mitranim/posterus In the case of the article, we're not going to do anything more with the Promise references returned by those fetch calls, but it seems Promises are designed…
    comment by imbnwa · 2021-06-21 · in AbortController
  4. Added more examples and motivations for cancelation: https://github.com/Mitranim/posterus/blob/17c89694ecdce4633f...
  5. Added a readme section on Rx: https://github.com/Mitranim/posterus/blob/17c89694ecdce4633f...
  6. …they come with generator-based coroutines that work with futures, and are automatically cancelable: https://github.com/Mitranim/posterus#routine You can even run it with Koa 2 instead of async/await: https://github.com/Mitranim/koa-ring
  7. …I understand the question correctly, `Future.all` and `Future.race` address exactly this case. [1] https://github.com/Mitranim/posterus#futureallvalues [2] https://github.com/Mitranim/posterus#futureracevalues
  8. Posterus provides coroutines just for that: https://github.com/Mitranim/posterus#routine Posterus coroutines are similar to async/await, but cancelable and free of `await`'s race condition problem (promise can get rejected before `await`…
  9. ▲ 84
    Show HN: Cancelable async primitives for JavaScript
    story by Mitranim · 2017-08-08 · 97 comments