Message156843
| Author |
Jim.Jewett |
| Recipients |
Jim.Jewett |
| Date |
2012年03月26日.18:16:50 |
| SpamBayes Score |
2.5173816e-07 |
| Marked as misclassified |
No |
| Message-id |
<1332785811.84.0.616508221107.issue14417@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Per the 3.3 WhatsNew:
"""issue 14205: A dict lookup now raises a RuntimeError if the dict is modified during the lookup. If you implement your own comparison function for objects used as dict keys and the dict is shared by multiple threads, access to the dict should be protected by a lock."""
This should be easier to do. My suggestion would be that the change to (general) lookdict (or possibly an additional transition, if you want a less-slow path for non-string non-container builtins) create the lock, and acquire/release that lock. At a minimum, there should be a dict subclass that does this.
[Note that this is arguably a regression, since previous python versions would just retry, which would be enough to protect innocent but unlucky code.] |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年03月26日 18:16:51 | Jim.Jewett | set | recipients:
+ Jim.Jewett |
| 2012年03月26日 18:16:51 | Jim.Jewett | set | messageid: <1332785811.84.0.616508221107.issue14417@psf.upfronthosting.co.za> |
| 2012年03月26日 18:16:51 | Jim.Jewett | link | issue14417 messages |
| 2012年03月26日 18:16:50 | Jim.Jewett | create |
|