in reply to Re: threads + sockets stalling question
in thread threads + sockets stalling question
Hm. The problem comes down to the fact that PerlIO calls the crt fstat() in order to determine if the file descriptor it is trying to clone, is attached to a "regular file".
As the file descriptor in question is currently in an accept state in another thread and the CRT serialises access, the fstat blocks. The entire Perl_clone() blocks, and the client threads are never started.
When I connect to the listener from an external process, the accept completes, which unlocks the file descriptor. Thus the fstat() returns allowing the Perl_clone to complete and the client threads get created.
The real problem here seems to be the hookey methods used inside PerlIO. There has to be a better way than to try to fstat() a socket, to determine if it is socket.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: threads + sockets stalling question
by Corion (Patriarch) on Mar 17, 2010 at 14:53 UTC | |
by BrowserUk (Patriarch) on Mar 17, 2010 at 16:08 UTC | |
by ikegami (Patriarch) on Mar 17, 2010 at 16:24 UTC | |
by BrowserUk (Patriarch) on Mar 17, 2010 at 16:51 UTC | |
by Corion (Patriarch) on Mar 17, 2010 at 17:10 UTC | |
|