[gambit-list] Calling Scheme code from different OS threads

Jeff Read bitwize at gmail.com
Sun Feb 25 09:19:12 EST 2007


James,

On 2/25/07, James Long <longster at gmail.com> wrote:
> I need the ability to create OS threads because of the blocking nature of
> the c calls (mainly with c functions that do network stuff).  I ended up
> wrapping up boost's excellent thread library in c functions (everything is
> compiled as c++ now because it's a c++ library, which should be fine) to
> maintain cross-platform-ness.  The resulting interface is clean and simple
> and it works great.

Have you considered nonblocking I/O? I do not know enough about your
application to know whether this is practical or not (some network
operations like DNS can't easily be made nonblocking), but it is the
approach I have taken for Gamsock, for better cooperation with
Gambit's (non-native) thread system.

By the way, new Gamsock at:
http://www.parodycheck.net/software/gamsock.tar.gz or darcs get
http://www.parodycheck.net/repos/gamsock

--Jeff



More information about the Gambit-list mailing list