GC Bug? Error: Unable to accept socket connection: Interrupted system call

Huang Guan gdxxhg at gmail.com
Sun Jun 8 09:54:44 PDT 2008


Sean Kelly Wrote:

> == Quote from Huang Guan (gdxxhg at gmail.com)'s article
> > I got this error under Linux while I didn't find it under Windows.
> > This is the code:
> > private import std.thread, std.stdio, std.gc, std.c.time, std.socket;
> > Socket s;
> > int test(void* arg){
> > 	s.bind( new InternetAddress( 8888 ) );
> > 	s.listen(10);
> > 	Socket a = s.accept();
> > 	// never reach
> 
> Are you saying the thread never completes?  I might expect s.accept()
> to return prematurely if a GC cycle occurs, but I wouldn't expect it to
> lock up.  But then I've never looked at std.socket, so perhaps there's
> a bug in the code.  I can assure you that Tango doesn't have this
> problem :p
> 
> 
> Sean

Yes, Tango doesn't have this problem and I am using it now.
I found there is a bug in class Stdout( Tango ). Once Stdout accessed by many threads, it raised some strange error such as exited without any warning.




More information about the Digitalmars-d mailing list