classification
Title: [threading] Add daemon argument to Timer
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.8
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: Mariatta, awolokita, pitrou, vstinner
Priority: normal Keywords:

Created on 2017-05-31 02:54 by awolokita, last changed 2020-03-09 11:14 by vstinner. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 1878 closed awolokita, 2017-05-31 02:54
Messages (2)
msg294808 - (view) Author: Andre Wolokita (awolokita) * Date: 2017-05-31 02:54
Currently in order to have daemonic Timer objects one must instantiate the class, set daemonic status through the property (Timer.daemon=True), and then start the Timer. It would be nice to have the ability to set the daemonic status of the Timer class during instantiation, similar to what is possible with the Thread superclass.

This is a trivial enhancement to implement: simply add the daemon keyword argument to the Timer constructor, defaulted to None, and pass it on to the Thread constructor in the call to super().__init__.
msg363715 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-03-09 11:14
Daemon threads are very fragile by design. I would prefer to not promote their usage. See for example bpo-39877 for a recent example. I would prefer to remove support for daemon threads, rather than adding more daemon threads!

I reject the issue.

Moreover, PR 1878 has been closed.
History
Date User Action Args
2020-03-09 11:14:13vstinnersetstatus: open -> closed

nosy: + vstinner
messages: + msg363715

resolution: rejected
stage: patch review -> resolved
2019-04-13 21:31:48cheryl.sabellasettitle: Add daemon argument to Timer -> [threading] Add daemon argument to Timer
2019-04-13 21:30:20cheryl.sabellasetnosy: + pitrou

versions: + Python 3.8, - Python 3.7
2017-05-31 03:05:19Mariattasetnosy: + Mariatta
2017-05-31 03:05:06Mariattasetcomponents: + Library (Lib)
2017-05-31 03:04:50Mariattasetstage: patch review
2017-05-31 02:54:13awolokitacreate