-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "daemon" argument to threading.Thread constructor #50314
Comments
It would be nice if threading.Thread constructor will have a "daemon" This way we'll be able to write Instead of currently writing |
+1 |
Attaching a patch against trunk (at revision 72805). |
I think that |
+1, but I can't apply the patch cleanly: $ patch -p0 < threading.diff
patching file Doc/library/threading.rst
Hunk #1 succeeded at 198 (offset -17 lines).
Hunk #2 succeeded at 211 (offset -17 lines).
Hunk #3 succeeded at 230 (offset -17 lines).
patching file Lib/threading.py
Hunk #1 succeeded at 407 with fuzz 1 (offset -16 lines).
Hunk #2 FAILED at 416.
1 out of 2 hunks FAILED -- saving rejects to file Lib/threading.py.rej
patching file Lib/test/test_threading.py
Hunk #1 succeeded at 350 with fuzz 2 (offset 14 lines). |
I'm attaching a new diff (svn diff > threading.diff), hope this one's OK. |
Nope. Our working copies seem to be different. I'm uploading mine, Hunk 2 on threading.py fails because your attributes use two leading |
I'm diffing against the 2.7 branch, I guess your comes from the 3.2? Will checkout 3.2 and do it there as well. |
Attaching a diff against the py3k branch on revision 73468 |
Patch applies cleanly and all tests pass. I used it for a while and |
+1 to the py3k diff. :) |
+1 on making it a keyword-only argument. |
+1 from me as well. |
+1 to this, and I'd need to make the same patch/change to |
Patch for multiprocessing, adding the daemon kwarg attached. |
Hello, I've taken the liberty of updating the two patch files here for python3.2 at revision 83065. Apologies if I'm treading on anyones toes here. I'm taking part in a europython sprint and this is the first time I've tried this. I've modified the multiprocessing patch. The documentation didn't agree with the behaviour of the code, so I've changed the Doc file. I've also added an extra test for the default behaviour. I've reviewed the code for PEP-8 (as an exercise for me) and run the tests and they passed ok. Steven |
Here's the patch for multiprocessing based on python 3 revision 83065, all credit to the original author, all problems probably mine! |
I've updated the patch for 3.2 and improved the documentation formatting. |
Looks like it lost my patch, but Steven's does the same. One tweak: in threading.rst put all of the class signature on one line or the html formatting will be a bit off. |
I corrected the patches (they were breaking the property of inheriting daemon by default) and committed them in r88618. Thank you! |
Thank you! On Fri, Feb 25, 2011 at 2:08 PM, Antoine Pitrou <report@bugs.python.org> wrote:
|
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: