[Spread-users] Error

Guido van Rossum guido at python.org
Fri Jan 18 17:58:25 EST 2002


> The problem I remember did have to do with thread behavior when a
> disconnect occured on a socket. The problem is that there are races
> when one thread gets a socket error and closes a socket (in the
> libsp code) and other threads are also trying to use that socket. I
> think it actually only happened when the socket was immediately
> reconnected and the socket number (fd) got reused. We know how to
> fix it, and I just don't recall if we have already integrated the
> fix or not.

I find it kind of strange that Spread closes the socket file
descriptor; it would have been safer for the user if it just marked
that mbox as "bad" without actually closing it (the reason being the
file descriptor reuse case you describe).  I had to put a bandaid
around this problem in the Python wrapper (this bandaid isn't on the
distribution on the web yet).

--Guido van Rossum (home page: http://www.python.org/~guido/)





More information about the Spread-users mailing list