Author pitrou
Recipients Ringding, neologix, pitrou
Date 2013-03-16.18:42:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Isn't the thread state clearing subject to a race condition? PyThreadState_Clear() will release a bunch of frames, deallocating arbitrary objects and therefore potentially releasing the GIL. This lets the main thread run and potentially spawn other threads, which may be wrongly deallocated in the following loop iteration.

A solution would be to detach the thread states from the linked list and clear them afterwards.
Date User Action Args
2013-03-16 18:42:47pitrousetrecipients: + pitrou, Ringding, neologix
2013-03-16 18:42:47pitrousetmessageid: <>
2013-03-16 18:42:47pitroulinkissue17094 messages
2013-03-16 18:42:46pitroucreate