Semantics of thread.error

"Martin v. Löwis" martin at v.loewis.de
Sun Aug 5 13:50:56 EDT 2007


Paul Miller schrieb:
> In the language documentation, all that is said about thread.error is
> that it's raised "on thread-specific errors."  Is there anywhere a
> list of conditions which will cause thread.error to be raised? 

I don't think so. However, it is fairly easy to extract such a list
from the source: "grep ThreadError */*.c" reveals these causes

  PyErr_SetString(ThreadError, "release unlocked lock");
  PyErr_SetString(ThreadError, "can't allocate lock");
  PyErr_SetString(ThreadError, "can't start new thread");
  PyErr_SetString(ThreadError, "no current thread ident");
  PyErr_SetString(ThreadError, "setting stack size not supported");

Regards,
Martin



More information about the Python-list mailing list