[dev] "channel" construct for inter-thread communication in C programs

From: Mate Nagy <mnagy_AT_port70.net>
Date: Thu, 9 Sep 2010 13:21:39 +0200

Hello all,

I guess I can't get enough of the punishment I always get in these
threads. Announcing project:

http://repo.hu/projects/cchan/

'This is a small library that implements a "channel" construct for
inter-thread communication in C programs. '

This is a very small and simple lib that does one thing only.
It uses mutexes and conds for synchronization; it is interfaced to the
thread API using a very thin .h file with macros. It would be probably
quite easy to port it to use other thread APIs. Currently it supports
pthreads and SDL threads.

Doesn't use C99 or gcc-specific features, hopefully.

Future development: would be nice to implement a select() operation for
listening on multiple channels at once; would probably also be very
complicated.

Regards,
 Mate

PS. I'm fully aware that Plan 9 has this functionality built in. Not
interested in "you should use plan9 and/or plan9 portability libs" mails
thanx
Received on Thu Sep 09 2010 - 13:21:39 CEST

This archive was generated by hypermail 2.2.0 : Thu Sep 09 2010 - 13:24:02 CEST