Go-style concurrency in C

Libmill is a library that introduces Go-style concurrency to C.

It can execute up to 20 million coroutines and 50 million context switches per second.

Go C go foo(arg1, arg2, arg3) go(foo(arg1, arg2, arg3)); ch := make(chan int) chan ch = chmake(int, 0); ch := make(chan int, 1000) chan ch = chmake(int, 1000); ch chs(ch, int, 42); i := int i = chr(ch, int); close(ch) chdone(ch, int, 0); <garbage collector> chclose(ch); select {

case ch foo()

case i := bar(i)

default:

baz()

} choose {

out(ch, int, 42):

foo();

in(ch, int, i):

bar(i);

otherwise:

baz();end

}

If you would prefer the same functionality with C-idiomatic API check libdill.

Libmill is licensed under MIT/X11 license.