Skip to content

Concurrency

Requires TypeScript 5.4 or newer.

Terminal window
npm i ciorent

ciorent provides simple & optimized primitives for concurrency.

PrimitiveDescription
SleepSynchronous and asynchronous sleep functions.
YieldContinue the execution of an asynchronous task on next tick, allowing other tasks to run.
SemaphoreControl access to a common resource by multiple tasks.