Tai Chi Minh Ralph Eastwood
Tai Chi Minh Ralph Eastwood
After thinking about this a bit too I think making channels unbuffered is the way to go. My thoughts seem to align with 1 and 2. For 3, I'm thinking...
Use cases: - Channel as a messages queue - Channel as a synchronisation mechanism Implementation - Buffered within channel - No buffer within channel (but receiver passes a buffer) Questions:...
One thought about implementing your own buffer on top of unbuffered channels would be to try and `chsend` and detect failure, then store into a local buffer and then continue...
With discussion with @paulofaria earlier about an example of buffered channels (using Venice which in turn uses libmill): https://github.com/Zewo/Venice/blob/master/README.md#10---iterating-over-channels We considered what it would mean in the context of an...
> That being said, if the user wants to pass arbitrarily sized buffer, they can just pass a pointer. Yes, this would be the building block for `queue`. > Having...
Are you planning to add `queue` within libdill or this user-implemented functionality? If it is going to be added to libdill I'll keep this open, if not I guess that...
I've narrowed down the issue: ``` C #include #include #include "libdill.h" coroutine void worker(int count, const char *text) { int i; for(i = 0; i != count; ++i) { printf("%s\n",...
I've figured out what GCC 6.2.1 introduces that breaks the "black magic". In older versions of GCC, the `-fstack-protector` does not cover all cases. They have fixed it in 6.2.1...
My only solution in mind is inline assembly but it has the downside that it would need to be written per architecture. Making it work with -fstack-protector is desirable because...
I've been working on a solution... and sad to say, but there's no easily-compatible solution. The closest I arrived at was: ``` C #define go(fn) \ ({\ sigjmp_buf *ctx;\ int...