[ python-Bugs-971395 ] thread.name crashes interpreter
SourceForge.net
noreply at sourceforge.net
Fri Jun 11 16:15:24 EDT 2004
Bugs item #971395, was opened at 2004-06-11 20:15
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=971395&group_id=5470
Category: Threads
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Jonathan Ellis (ellisj)
Assigned to: Nobody/Anonymous (nobody)
Summary: thread.name crashes interpreter
Initial Comment:
I changed the __repr__ method of the cookbook Future
class --
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/84317
-- as follows:
def __repr__(self):
return '<%s at %s:%s>' % (self.__T.name,
hex(id(self)), self.__status)
this caused obscure crashes with the uninformative message
Fatal Python error: PyEval_SaveThread: NULL tstate
changing to __T.getName() fixed the crashing.
It seems to me that thread.name should be __name or
_name to help novices not shoot themselves in the foot.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=971395&group_id=5470
More information about the Python-bugs-list
mailing list