Nigeria No1. Music site And Complete Entertainment portal for Music Promotion WhatsApp:- +2349077287056
Sunday, 5 November 2023
Show HN: Ts-Chan – Go-Like Concurrency Primitives for TypeScript/JavaScript https://bit.ly/3QtV05Y
Show HN: Ts-Chan – Go-Like Concurrency Primitives for TypeScript/JavaScript Hey HN, I’m sharing ts-chan, an NPM package providing Go-like concurrency primitives, including channels and select statements, for TypeScript and JavaScript, supporting Node.js, Deno, Bun, and browsers. This is something I've built to make implementing Go-style "control loops" feasible in JavaScript, but there are many possible applications. Highlights: - Features a FIFO processing Chan class and versatile Select class for concurrency control. - Supports buffered channel and channel close semantics very close to Go's. - TypeScript-first implementation. - Defines a simple "channel protocol" inspired by JavaScript's iteration protocols, that's used by `Select`, and implemented by `Chan`. - Makes an effort to mitigate cycles caused by the behavior of JavaScript's microtask queue. - Ongoing project with active iteration for a production-ready module (pre-v1, so the API isn't guaranteed to be stable, but the implementation itself is). NPM: ts-chan GitHub: github.com/joeycumines/ts-chan Thanks! https://bit.ly/3QtadnO November 5, 2023 at 11:50PM
Labels:
Hacker News
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment