homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients greg.ath, neologix, pitrou, vstinner
Date 2011年06月27日.22:28:02
SpamBayes Score 6.1244914e-06
Marked as misclassified No
Message-id <1309213682.91.0.893412289291.issue12352@psf.upfronthosting.co.za>
In-reply-to
Content
heap_gc_deadlock_lockless.diff: _free_pending_blocks() and free() execute the following instructions in a different order, is it a problem?
+ self._free(block)
+ self._allocated_blocks.remove(block)
vs
+ self._allocated_blocks.remove(block)
+ self._free(block)
You may call _free_pending_blocks() just after loack.acquire() and a second time before before lock.release()... it is maybe overkill, but it should reduce the probability of the delayed free problem.
You may document that _pending_free_blocks.append() and _pending_free_blocks.pop() are atomic in CPython and don't need a specific lock.
History
Date User Action Args
2011年06月27日 22:28:03vstinnersetrecipients: + vstinner, pitrou, neologix, greg.ath
2011年06月27日 22:28:02vstinnersetmessageid: <1309213682.91.0.893412289291.issue12352@psf.upfronthosting.co.za>
2011年06月27日 22:28:02vstinnerlinkissue12352 messages
2011年06月27日 22:28:02vstinnercreate

AltStyle によって変換されたページ (->オリジナル) /