
Libtask: a Coroutine Library for C and Unix - uriel
http://swtch.com/libtask/
======
draegtun
There is also libcoro. In fact I think there's two of them ;-)

First is <http://www.freebsdsoftware.org/devel/libcoro.html>

Second is part of the excellent Coro Perl module:
<http://search.cpan.org/dist/Coro/>

~~~
limmeau
Libcoro's FreeBSD ports page claims to support i386 only, while Libtask
supports i386, PowerPC, Sparc and ARM.

~~~
james2vegas
I think that is inaccurate, and probably based on the backend they are using:
* -DCORO_ASM * Handcoded assembly, known to work only on a few
architectures/ABI: GCC + x86/IA32 and amd64/x86_64 + GNU/Linux and a few BSDs.

The other backends use standard libc/SUSv2 calls like (get|set|swap)context,
setjmp|longjmp and sigaltstack

------
witten
If you're looking for something like this for Python, check out the greenlet
library: <http://pypi.python.org/pypi/greenlet>

~~~
uriel
Very nice, I really like stackless and anyone writing concurrent code in
python should use it.

------
ralph
It's unfortunate that he leaves channels until last and doesn't describe them
fully. Understanding the benefits of structuring code to use channels is up
there with other programming paradigms.

------
iheartmemcache
How does this compare to libevent and other NIO libs?

~~~
agazso
While libtask contains primitives for io (see fdread and other fd* functions)
it uses poll() internally which does not scale well. And that is one of the
problems that libevent solves by using the best available polling mechanism
available. Libevent also provides timer and signal events while libtask does
not.

