[Home] [Groups] - Message: [Prev in Group] [Next in Group]

nu.kanga.list.mud-dev

9425: [MUD-Dev] Re: Sockets and fibers

[Full Header] [Plain Text]
From: Jo Dillon <emily@thelonious.new.ox.ac.uk>
Newsgroups: nu.kanga.list.mud-dev
Date: Wed, 20 Jan 1999 17:26:05 +0000
References: [1]
Organization: Kanga.Nu
Caliban Tiresias Darklock (caliban@darklock.com) spake thusly:
> 
> Hopefully, this won't bounce. Once I get a message through, I'll pump
> previous messages that bounced back through here. (Not your fault, name
> server refresh problem on my end. Can't be helped.)
> 
> Has anyone here looked at the possibilities of spawning a single thread
> which handles sockets and then using Microsoft's "fibers" to handle
> individual sockets? How much of the one-thread-per-socket problem would be
> solved by this? With the speed of modern computers, what are the real
> problems with just serialising the socket handling -- one thread with all
> the sockets, servicing each socket in turn for some small time slice?

  Correct me if I'm wrong, and I'm not an expert here, but aren't
fibers effectively cooperative threads? Isn't it likely that a blocking socket
read would block all the fibres? If not, they'd have to be real threads,
which would seem to imply you'd still get the context-switching overhead
that makes lots of threads bad news.

--
	Jo