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.

classification
Title: thread_PyThread_start_new_thread fails with a generic error
Type: enhancement Stage: patch review
Components: Versions: Python 3.4
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ZackerySpytz, kristjan.jonsson, pitrou
Priority: normal Keywords: patch

Created on 2012-09-23 08:34 by kristjan.jonsson, last changed 2022-04-11 14:57 by admin.

Pull Requests
URL Status Linked Edit
PR 22068 open ZackerySpytz, 2020-09-02 16:54
Messages (2)
msg171017 - (view) Author: Kristján Valur Jónsson (kristjan.jonsson) * (Python committer) Date: 2012-09-23 08:34
If thread creation fails, for any reason, a ThreadError is returned with the error "can't start new thread".
No attempt is made to diagnose the issue.
In fact, for example, if we are out of resources, pthread_new() would have returned EAGAIN.  This should perhaps rather be classified as an OSError so that users can catch this and diagnose it.  ThreadError seems to be used otherwise exclusively to indicate problems with locking.

Can this be turned into an informative OSError, or is it to platform dependant for any sensible structured error handlng to be implemented?
msg171045 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-09-23 15:35
I'm personally ok with using a more informative error than ThreadError.
History
Date User Action Args
2022-04-11 14:57:36adminsetgithub: 60207
2020-09-02 16:54:01ZackerySpytzsetkeywords: + patch
nosy: + ZackerySpytz

pull_requests: + pull_request21158
stage: patch review
2012-09-23 15:35:48pitrousetnosy: + pitrou
messages: + msg171045
2012-09-23 08:34:06kristjan.jonssoncreate