The semantics of `threading.Thread.join()` are "wait for this thread to
end" and nothing more.
However, `LiveServerThread` redefines these semantics to **first cause
this thread to end** and then wait for this thread to end.
This harms reusability, because someone calling `join()` on this object
would expect the regular semantics and not the Django-specific
redefinition. I've encountered this bug in 1.5 but visual inspection of
`master` shows that at the time of writing this ticket it is present there
too.
--
Ticket URL: <https://code.djangoproject.com/ticket/21172>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => assigned
* cc: unai@… (added)
* needs_better_patch: => 0
* needs_tests: => 0
* owner: nobody => unaizalakain
* needs_docs: => 0
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/21172#comment:1>
* keywords: => live server, test server, live wsgi
--
Ticket URL: <https://code.djangoproject.com/ticket/21172#comment:2>
* has_patch: 0 => 1
Comment:
Patch: [https://github.com/unaizalakain/django/tree/ticket_21172]
--
Ticket URL: <https://code.djangoproject.com/ticket/21172#comment:3>
* easy: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/21172#comment:4>
Comment (by unaizalakain):
Pull request: https://github.com/django/django/pull/1743
--
Ticket URL: <https://code.djangoproject.com/ticket/21172#comment:5>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/21172#comment:6>
* stage: Ready for checkin => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/21172#comment:7>
* stage: Accepted => Ready for checkin
Comment:
Other than the comment I left which can be addressed at commit time, LGTM.
--
Ticket URL: <https://code.djangoproject.com/ticket/21172#comment:8>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"1830f50493cae042dac11957af986b0fd84f889f"]:
{{{
#!CommitTicketReference repository=""
revision="1830f50493cae042dac11957af986b0fd84f889f"
Merge pull request #1743 from unaizalakain/ticket_21172
Fixed #21172 -- have LiveServerThread follow the semantics of
threading.Thread.join()
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21172#comment:9>
Comment (by Anssi Kääriäinen <akaariai@…>):
In [changeset:"3c10d1e64faeb67b41e7aa501b21252e357a4564"]:
{{{
#!CommitTicketReference repository=""
revision="3c10d1e64faeb67b41e7aa501b21252e357a4564"
Removed useless comment. Refs #21172
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21172#comment:10>