News for hackers. Stuff that matters.
Re:Libdill: Structured Concurrency for C (2016) by beagle3 on Thursday December 21, 2017 @08:12AM (#15978492)
Could have, possibly, but makes no sense at all to retrofit libuv with libdill at this point
Re:Libdill: Structured Concurrency for C (2016) by piscisaureus on Thursday December 21, 2017 @09:59AM (#15979129)
Shameless(-ish) plug: https://github.com/piscisaureus/wepoll is not a fat abstraction layer but it could help with windows support.
Re:Libdill: Structured Concurrency for C (2016) by beagle3 on Thursday December 21, 2017 @10:09AM (#15979219)
Libuv supports windows and in some ways only exists because windows support is needed; on Unix/Linux where Node started, libev was sufficient; libuv was created to facilitate the windows port of node - though it is now standing in its own right.
Re:Libdill: Structured Concurrency for C (2016) by piscisaureus on Thursday December 21, 2017 @10:14AM (#15979265)
I know - I am one of the authors of libuv. However libuv is pretty big and imposes its own asynchronous i/o model onto your application.

Later I discovered that it is possible to do efficient epoll emulation on windows so then I wrote wepoll. With it you can just stick to the good ol' epoll/kqueue model and still support windows.

Re:Libdill: Structured Concurrency for C (2016) by rumcajz on Thursday December 21, 2017 @11:03AM (#15979760)
How does it work? It's not obvious how epoll could be built on top of IOCP.
Re:Libdill: Structured Concurrency for C (2016) by piscisaureus on Thursday December 21, 2017 @11:33AM (#15980182)
It uses an ioctl that boils down to 'an overlapped version of poll()'. So the call doesn't block - instead when an event like POLLIN or POLLOUT happens, a completion is posted to the completion port.

Call this overlapped-poll function on every monitored socket individually so you don't inherit poll()s scalability problems.

See https://github.com/piscisaureus/wepoll/blob/437fb2f24ce197b4...

This is as much of an explanation I can type on my phone - I'll add more detail to the wepoll readme later.

Re:Libdill: Structured Concurrency for C (2016) by scadge on Thursday December 21, 2017 @08:21AM (#15978538)
Sure, I understand. Was just curious about how they both relate, and now I get it.