[New-bugs-announce] [issue16003] thread_PyThread_start_new_thread fails with a generic error

Kristján Valur Jónsson report at bugs.python.org
Sun Sep 23 10:34:06 CEST 2012


New submission from Kristján Valur Jónsson:

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?

----------
messages: 171017
nosy: kristjan.jonsson
priority: normal
severity: normal
status: open
title: thread_PyThread_start_new_thread fails with a generic error
type: enhancement
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16003>
_______________________________________


More information about the New-bugs-announce mailing list