News for hackers. Stuff that matters.
Re:Libdill: Structured concurrency in C by the_duke on Saturday June 04, 2016 @05:54AM (#11835717)
How is this different from https://github.com/sustrik/libmill?

It's from the same author.

Re:Libdill: Structured concurrency in C by the_duke on Saturday June 04, 2016 @05:56AM (#11835723)
Just noticed that there is an entry in the FAQ.

Pasting here for others:

http://libdill.org/documentation.html

It's C-idiomatic. Whereas libmill takes Go's concurrency API a implements them in almost 1:1 manner in C, libdill tries to provide the same functionality via more C-like and POSIX-y API. For example, choose is a function rather than a language construct, Go-style panic is replaced by returning an error code and so on.

Coroutines and processes can be canceled. This creates a foundation for "structured concurrency". chdone causes blocked recv on the channel to return EPIPE error rather than a value.

chdone will signal senders to the channel as well as receivers. This allows for scenarios like multiple senders and single receiver communicating via single channel. The receiver can let the senders know that it's terminating via chdone.

libmill's fdwait was replaced by fdin and fdout. The idea is that if we want data to flow via the connection in both directions in parallel we should use two coroutines rather than single one. There's no networking library in libdill. This is meant to be a separate project.

Re:Libdill: Structured concurrency in C by norswap on Saturday June 04, 2016 @09:46AM (#11836298)
Is it meant to be a successor then? Or are they complementary? It's misleading that the FAQ only seems to mention advantages.
Re:Libdill: Structured concurrency in C by the_duke on Saturday June 04, 2016 @02:00PM (#11837229)
For reference:

libmill was a project to copy Go's concurrency model to C 1:1 without introducing any innovations or experiments. The project is finished now. It will be maintained but won't change in the future.

libdill is a follow-up project that diverges from the Go model and experiments with structured concurrency. It is not stable yet and it may change a bit in the future.

Re:Libdill: Structured concurrency in C by rumcajz on Saturday June 04, 2016 @12:33PM (#11836895)
I've updated the FAQ to cover this question.
Re:Libdill: Structured concurrency in C by rektide on Saturday June 04, 2016 @11:26AM (#11836632)
libdill's development is much more recent: started january 11 (6 months old), 384 commits. libmill is "Go concurrency in C" library and is significantly older: end of April 2014 (2 years old), 992 commits.