[Top][All Lists]

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

Re: A guile story

From: Kevin Ryde
Subject: Re: A guile story
Date: Wed, 29 Nov 2006 07:09:07 +1100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

Neil Jerram <address@hidden> writes:
> I eventually narrowed this down to the interaction between calling
> accept on the main FTP server thread at the same time as read on the
> FTP data connection thread (which is where the breakpoint was hit).
> At least, the problem was apparently fixed by inserting a select
> before the accept, so that the accept never blocked.  I'm aware that
> this problem has been reported before, and that someone prepared a
> patch to fix it, but (i) I thought we had applied that patch, and (ii)
> I thought the problem affected coop threads only, not pthreads.

I ran into recvfrom() blocking all threads not so long ago too.  I
forget if I posted here about it, but I put a remark in the manual,

     On a GNU/Linux system `recvfrom!' is not multi-threading, all
     threads stop while a `recvfrom!' call is in progress.  An
     application may need to use `select', `O_NONBLOCK' or
     `MSG_DONTWAIT' to avoid this.

It's tempting to try to do better in guile, though no doubt it'd help
everybody if it could be improved in libc or libpthreads or wherever.

reply via email to

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