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.

Title: set_daemon does not exist in Thread
Type: Stage:
Components: Documentation Versions: Python 3.0
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: benjamin.peterson, georg.brandl, mnewman
Priority: normal Keywords:

Created on 2009-01-28 01:25 by mnewman, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit mnewman, 2009-01-28 01:25
Messages (2)
msg80686 - (view) Author: Michael Newman (mnewman) Date: 2009-01-28 01:25
This is related to:

I found in the example at the bottom of:
won't work.

Python 3.0 (r30:67507, Dec  3 2008, 20:14:27) [MSC v.1500 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from threading import Thread
>>> t = Thread()
>>> dir(t)
['_Thread__exc_info', '_Thread__initialized', '__class__',
'__delattr__', '__dic
t__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__',
 '__hash__', '__init__', '__le__', '__lt__', '__module__', '__ne__',
'__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__',
', '__subclasshook__', '__weakref__', '_args', '_block', '_bootstrap',
ap_inner', '_daemonic', '_delete', '_ident', '_initialized', '_kwargs',
 '_note', '_set_daemon', '_started', '_stderr', '_stop', '_stopped',
'_verbose', 'daemon', 'getName', 'ident', 'isAlive', 'isDaemon',
'is_alive', 'jo
in', 'name', 'run', 'setDaemon', 'setName', 'start']
>>> t.set_daemon(True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'Thread' object has no attribute 'set_daemon'
>>> t.daemon
# This appears to be the proper method, unless "set_daemon" gets added
in (or setDaemon is used, but that appears to be depreciated syntax):
>>> t.daemon = True
>>> t.daemon

Please see the attached "" for my own working example. It
would be helpful to include the line:
>>> from threading import Thread
in the official example.
msg80806 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2009-01-30 02:29
Fixed in r69114.
Date User Action Args
2022-04-11 14:56:44adminsetgithub: 49337
2009-01-30 02:29:58benjamin.petersonsetstatus: open -> closed
resolution: fixed
messages: + msg80806
nosy: + benjamin.peterson
2009-01-28 04:15:21benjamin.petersonlinkissue5086 superseder
2009-01-28 01:25:28mnewmancreate