Tau-0/kioto
Concurrency library for Zig
Concurrency library for Zig
Orthogonal abstractions for concurrency: runtime × fibers × futures:
ConcurrentRuntime
ManualRuntime
for testing and debuggingmakeContract
spawn
ready
unit
map
– maps a value of type T
to type U
flatten
– flattens nested futures (for asynchronous mappers)flatMap
– Map
+ Flatten
via
– sets runtime for mappersafter
– sets delayboth
first
get
– unwraps value from future, blocks threadawait
– unwraps value from future, does not block threadyield
sleepFor
suspendFiber
spawn
Mutex
Event
WaitGroup
BufferedChannel
UnbufferedChannel
Supported | |
---|---|
Architecture | x86-64 |
Operating System | Linux |
Compiler | Zig 0.14.0 |
# Clone repo
git clone https://github.com/Tau-0/kioto.git
cd kioto
# Run playground
zig build -Doptimize=ReleaseFast playground
# Run tests
zig build test
Roman Lipovsky for the amazing course "Theory and Practice of Concurrency"