[plt-scheme] Cleanup on Servlet Timeout (Again)

From: Henk Boom (lunarc.lists at gmail.com)
Date: Sun Aug 24 01:46:07 EDT 2008

2008/8/21 Matthew Flatt <mflatt at cs.utah.edu>:
> The process representing the resource accepts reader requests and lets
> them run them in parallel; when a reader asks to become a writer, then
> the managing process waits for all the other readers to finish before
> granting the conversion; if there's already a pending writer, then all
> new writer-conversion requests are rejected. The process can see when a
> reader/writer terminates, and it can adjust accordingly. The enclosed
> "rwlock.ss" illustrates this implementation.

I have a couple of questions: (so far =)

1) What is the purpose of 'reply'? The clients seem to read back from
their accept channels right away, so what is to be lost by blocking on
the calls to channel-put?
2) Looking at the documentation, 'remove' doesn't specify which
argument to the 'equals?' function comes from the list, your use in
removing a reader from the reader list assumes it is the second
argument. Is this correct? (I find filter clearer here in any case,
even if it does go through the whole list)

Thanks for the help,

Posted on the users mailing list.