[Mono-devel-list] Threading bug?
patrik.torstensson at intel.com
Mon Mar 10 14:19:55 EST 2003
What version of Mono are you using? There was a bug until the 0.21
> -----Original Message-----
> From: Simon Ask Ulsnes [mailto:simon at ulsnes.dk]
> Sent: Monday, March 10, 2003 7:53 PM
> To: mono-devel-list at lists.ximian.com
> Subject: [Mono-devel-list] Threading bug?
> Hello there,
> I was just writing a tiny Internet server program (one of
> those which tell you
> "Hello" when you telnet them). I had in mind from the
> beginning, that it was
> supposed to be multi-threaded so that I could support
> multiple clients at a
> The server works perfect - as long as I connect only one
> client. If I try and
> connect more clients, all of them hang up until the previous was
> The theory behind the program is to have a while(true)-loop
> in which a
> TcpListener accepts connections, starting a new thread
> handling each incoming
> But the loop doesn't continue when a connection has been
> made, it waits for
> the handler to finish.
> Since I am pretty sure this works on .NET Framework 1.0 on
> Windows, I figure
> it is a bug in the Threading-classes.
> The while(true)-loop looks like this:
> while (listening)
> And one more strange thing, the num_connections int is actually being
> incremented. Perhaps the
> ThreadPool.QueueUserWorkItem()-method is waiting for
> the previous QueueUserWorkItem() to finish?
> If this is a bug in my program, I am deeply sorry for the
> Yours sincerely,
> Simon Ask Ulsnes, Denmark
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
More information about the Mono-devel-list