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

From: Robby Findler (robby at cs.uchicago.edu)
Date: Sun Aug 24 10:24:34 EDT 2008

On Sun, Aug 24, 2008 at 6:11 AM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> At Sun, 24 Aug 2008 01:46:07 -0400, "Henk Boom" wrote:
>> 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?
>
> The client might be delayed indefinitely, either due to scheduling or
> being explicitly suspended by some third party. You don't want to block
> the server (and all other threads that might talk to the server) while
> one client is delayed.

But don't take Matthew's word for it! I bet you can make a particular
group of readers/writers (affectionately known as a "unit test") and
demonstrate the difference between the two possibilities.

Robby


Posted on the users mailing list.