Title: threading -- `thread.daemon = True` doesn't work as expected
Type: behaviour Severity: normal
Components: Library Versions: Jython 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: fwierzbicki, untothebreach, zyasoft
Priority: high Keywords:

Created on 2013-03-23.18:19:50 by untothebreach, last changed 2014-06-19.04:54:37 by zyasoft.

File name Uploaded Description Edit Remove untothebreach, 2013-03-23.18:19:50 Simple example of thread daemonizing that has different behavior on Jython as opposed to CPython
msg7968 (view) Author: Paul Woolcock (untothebreach) Date: 2013-03-23.18:19:50

In the CPython docs for the `threading` module, it lists this interface as the "old" interface:

    >>> Thread().setDaemon()
    >>> Thread().isDaemon()

and this is the "new" interface:

    >>> Thread().daemon = True|False
    >>> Thread().daemon

In Jython 2.7b1, using the "new" interface does not seem to actually daemonize the thread. Programs that use the "new" interface require a Ctrl-C to exit, as the threads are still foreground threads when the program finishes. I have uploaded a simple example.

I brought this up in #jython, and <agronholm> suggested that it was probably just an oversight, and that I should file a bug for it.
msg7971 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2013-03-23.20:22:12
It probably is an oversight - the threading module needs attention...
msg8704 (view) Author: Jim Baker (zyasoft) Date: 2014-06-19.04:54:37
Fixed as of

There was a duplicate bug report in #2125
Date User Action Args
2014-06-19 04:54:37zyasoftsetstatus: open -> closed
resolution: fixed
messages: + msg8704
nosy: + zyasoft
2013-03-23 20:22:12fwierzbickisetpriority: high
nosy: + fwierzbicki
messages: + msg7971
2013-03-23 18:25:51alex.gronholmsetcomponents: + Library
2013-03-23 18:19:50untothebreachcreate