guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: recv! and thread


From: Kevin Ryde
Subject: Re: recv! and thread
Date: Wed, 08 Mar 2006 07:56:10 +1100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

William Xu <address@hidden> writes:
>
> i have already tried that..

Oh, I see, in 1.6 it's a bare recv() call, it doesn't cooperate with
the multi-threading.  Hmm.  Not sure if it's easy to fix that, it
works in 1.8 because pthreads takes care of all blocking.

As a workaround in 1.6 I think you can stick in a select call

        (select (list sock) '() '())

just before the recv!, to wait for sock to have data ready to read.
(When select blocks it cooperates with the multi-threading, letting
other threads run.)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]