in reply to Re^8: threads + sockets stalling question
in thread threads + sockets stalling question
[accept()] currently works, it's [PerlIO] that has problems.
I don't see how PerlIO can be a problem. It's a system to provide IO layers to handles. Individual functions in Perl's IO library might have bugs, but that doesn't mean PerlIO is a problem.
In fact, this replicates the problem outside of PerlIO (I think):
#! perl -lw use strict; use threads; use IO::Socket; my $lsn = new IO::Socket::INET( Listen => 5, LocalPort => '12345' ) or die "Failed to open listening port: $!\n"; async{ print 'accept starting'; my $c = $lsn->accept; print 'accept returned'; }->detach; sleep 2; print "-d starting"; -d $lsn; # Freezes print "-d returned";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: threads + sockets stalling question
by BrowserUk (Patriarch) on Mar 18, 2010 at 23:51 UTC | |
by ikegami (Patriarch) on Mar 19, 2010 at 00:38 UTC | |
by BrowserUk (Patriarch) on Mar 19, 2010 at 01:23 UTC |