Re:Libaco: A fast and lightweight C asymmetric coroutine lib...
by byuu on Saturday July 14, 2018 @11:06AM
(#17530604)
Disappointing that Tencent took my library's name. I'd been using the name since 2006 or so. I guess you can't expect a two-letter lib* name to remain unique. My luck that theirs would become the most well known in this space, though.
Re:Libaco: A fast and lightweight C asymmetric coroutine lib...
by ausjke on Monday July 16, 2018 @08:31AM
(#17540748)
hi byuu, are you going to add arm64 support? or considering C99?
if I have multiple cores, what's the best way to leverage that along with libco? will cpu affinity help?
Re:Libaco: A fast and lightweight C asymmetric coroutine lib...
by byuu on Thursday July 19, 2018 @11:33PM
(#17572226)
Aarch64 support will show up as soon as I can get a Linux distro running on it to test the implementation with. My understanding is the ARM ABI isn't as well defined, and you tend to need slightly different implementations per device, so it may not be as useful as simply using the setjmp version.
You can set -DLIBCO_MP to get the co_active handle to be multi-threaded. Each preemptive thread would then have its own set of cooperative threads.
Re:Libaco: A fast and lightweight C asymmetric coroutine lib...
by skolemtotem on Saturday July 14, 2018 @11:26AM
(#17530682)
Hi Byuu! You're a cool guy and I hope I can be like you one day!
Re:Libaco: A fast and lightweight C asymmetric coroutine lib...
by cryptonector on Saturday July 14, 2018 @02:37PM
(#17531644)
Having done a bunch of work on PuTTY, I have to say I am a fan of Simon Tatham's C co-routines [0] (basically, a C preprocessor meta-programmed super Duff's device).
[0] https://www.chiark.greenend.org.uk/~sgtatham/coroutines.html
https://github.com/Tencent/libco
It's said golang learned from libtask:
https://github.com/jamwt/libtask
And something else:
https://github.com/baruch/libwire
https://github.com/halayli/lthread (multi-core friendly)