This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jyasskin
Recipients jyasskin
Date 2008-03-16.15:15:50
SpamBayes Score 0.061356474
Marked as misclassified No
Message-id <1205680557.19.0.19509352533.issue2302@psf.upfronthosting.co.za>
In-reply-to
Content
With the code as it stands, calls to shutdown that happen before
serve_forever enters its loop will deadlock, and there's no simple way
for the user to avoid this. The attached patch prevents the deadlock and
allows multiple serve_forever..shutdown cycles, but it's pretty
complicated. I could make it a lot simpler by making shutdown permanent:
any later serve_forever calls would return immediately.

A third choice would be to add a .serve_in_thread function that returns
a token that can be used to shut down exactly that loop, instead of
putting .shutdown() on the server. Any opinions?
History
Date User Action Args
2008-03-16 15:15:58jyasskinsetspambayes_score: 0.0613565 -> 0.061356474
recipients: + jyasskin
2008-03-16 15:15:57jyasskinsetspambayes_score: 0.0613565 -> 0.0613565
messageid: <1205680557.19.0.19509352533.issue2302@psf.upfronthosting.co.za>
2008-03-16 15:15:55jyasskinlinkissue2302 messages
2008-03-16 15:15:54jyasskincreate