Author pitrou
Recipients Ringding, neologix, pitrou
Date 2013-03-16.18:42:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1363459367.16.0.93314144207.issue17094@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-03-16 18:42:47pitrousetrecipients: + pitrou, Ringding, neologix
2013-03-16 18:42:47pitrousetmessageid: <1363459367.16.0.93314144207.issue17094@psf.upfronthosting.co.za>
2013-03-16 18:42:47pitroulinkissue17094 messages
2013-03-16 18:42:46pitroucreate