3 ms·
His implementation uses libtask, which says it schedules coroutines with "a single kernel thread." Looking at his code, he doesn't appear to extend this. Go pr
by rob05c 13y ago
His implementation uses libtask, which says it schedules coroutines with "a single kernel thread." Looking at his code, he doesn't appear to extend this.
Go provides microthreads, which are both concurrent and parallel, and extremely lightweight.
Libtask provides concurrency. It does not provide parallelism. Parallelism is important.
- majke 13y agoHis implementation uses libtask No. I just implement libtask/channel.c in Lua. It does not provide parallelism. Parallelism is important. I'm doing it in pure Lua. Lua doesn't use multiple OS threads. Doing channels _across_ Lua contexts would be an interesting thing.
- rob05c 13y agoAh, I misunderstood your project page. Lua doesn't use multiple OS threads. I didn't know that. That's really disappointing. Parallelism really is important. It sounds like it's possible, just really awkward: http://kotisivu.dnainternet.net/askok/bin/lanes/ http://kotisivu.dnainternet.net/askok/bin/lanes/ Kudos on making a nice CSP library for Lua though. In my opinion, CSP is a good paradigm for high-level concurrent and parallel processing. Hopefully one day Lua will add reasonable parallelism.