[plt-scheme] Re: Shared resources for servlets

From: Keith Frost (keithf at amnis.com)
Date: Wed Sep 10 12:56:23 EDT 2003

In the interest of answering my own question, I've built the following 
implementation of a one-writer many-reader system, using MzScheme 
channels.  It has the advantage over my original specification, that 
once a write request is sent, new readers are blocked until all write 
requests can be satisfied.

Now I have many more questions.  Is there a much simpler way of doing 
this that I'm not seeing?  Or do I have the right general idea?  Now, of 
course, in a real system, I'd have to account for threads dying after 
sending requests, which adds another layer of complexity --- the server 
thread can't just block when trying to fulfill a request, so are 
channels the wrong model for fulfilling requests?  And what are those 
other waitable things, guards and so forth?  Is there a way of 
implementing the Erlang model, where messages are always sent between 
processes in non-blocking mode?


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test-chans.scm
URL: <http://lists.racket-lang.org/users/archive/attachments/20030910/d42868b6/attachment.ksh>

Posted on the users mailing list.