[plt-scheme] Limiting Concurrent Connections to Web Server
2009/1/12 Jay McCarthy <jay.mccarthy at gmail.com>:
> Thanks for the catch. It's in SVN now.
Thanks for implementing this!
I tried it in one of the nightly builds, and it seems to maintain the
concurrency limit properly. I've noticed, though, that threads
belonging to cancelled connections are no longer dropped, though, so
if I hit refresh 10 times in firefox with a concurrency limit of 1, it
actually does the full calculations for all of the responses one at a
time before I get the final response.
I can't tell why this happens though, from looking at the above code.
Maybe it's because channel-put/get share the property of 'sleep' that
prevents the thread from being terminated? (What is that reason, by
the way?)
Henk