News for hackers. Stuff that matters.
Re:Protothreads: Lightweight Stackless Threads in C by signa11 on Thursday May 16, 2019 @02:30AM (#19926679)
unless you start doing blocking read/write...
Re:Protothreads: Lightweight Stackless Threads in C by danappelxx on Thursday May 16, 2019 @04:33AM (#19927169)
Libdill IO is nonblocking and calls returns a channel. Reading from the channel yields the coroutine, similar to the await statement in some languages.
Re:Protothreads: Lightweight Stackless Threads in C by signa11 on Thursday May 16, 2019 @05:29AM (#19927444)
oh cool ! does that happen for read/write to non-socket fd’s as well ?
Re:Protothreads: Lightweight Stackless Threads in C by danappelxx on Thursday May 16, 2019 @05:18PM (#19933360)
Yeah, see the file descriptors section on this page http://libdill.org/documentation.html
Re:Protothreads: Lightweight Stackless Threads in C by signa11 on Thursday May 16, 2019 @09:27PM (#19935299)
i did before posting here, and could not find anything that might have indicated that i.e. non-socket-fd reads end up with coroutine like semantics...