[plt-scheme] Limiting Concurrent Connections to Web Server

From: Henk Boom (lunarc.lists at gmail.com)
Date: Wed Jan 7 16:58:16 EST 2009

2009/1/7 Jay McCarthy <jay.mccarthy at gmail.com>:
> I'm not sure why you think yours doesn't work. If I set up the
> following test server:
> ...

I can duplicate your results.

However, try removing the sleep and changing (list
"<html><body>Limited</body></html>") to include a computation which
takes a long time to finish. I'm not at my main computer right now
(battery's dead =(), so I can't say exactly what I was using until I
get home tonight, but I had something like

(list (format "hello ~a" (sort (build-list 1000000 (lambda (x) (random
10))) <)))

With that, when I go into firefox and hit refresh twice quickly (i.e.
again before the first one exits), I only see "Exit limit" one time.
It's interesting that if I replace the (sleep 1) with the calculation
instead of putting it in the body the problem doesn't show up.


Posted on the users mailing list.