haskell httpd

ajb at spamcop.net ajb at spamcop.net
Fri Nov 7 09:58:14 EST 2003


G'day all.

Quoting Paul Graunke <ptg at ccs.neu.edu>:

> Right, cooperative multitasking is faster than preemptive multitasking.

That's often the case, but it depends.  Some OSes have very, very fast
thread primitives.  It also depends on the application, as I noted,
because what you lose in system call overhead you can win back elsewhere.

> One technique is to have several OS threads to make use of CPUs and
> do your own scheduling inside that.

That certainly works.  The "thread pool" approach is the simplest
incarnation of this.

> Is there a problem with having a system thread do the IO based on
> pulling events from a channel and pushing the results back to a
> channel?  You can push the result channel/mvar through the request
> channel along with the request.

Unfortunately, I can't think of a way to make this work with memory
mapped files, which are pretty important these days.

Cheers,
Andrew Bromage
_______________________________________________
Haskell mailing list
Haskell at haskell.org
http://www.haskell.org/mailman/listinfo/haskell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://haskell.org/pipermail/haskell/attachments/20031107/efa52b4d/attachment.htm


More information about the Haskell mailing list