Message1929
In the addPackage() method, we currently do:
modules.__finditem__()
modules.__delitem__()
modules.__setitem__()
where modules = Py.getSystemState().modules.
Each of these methods for itself is synchronized, but not this sequence. So, under heavy load, java imports can fail with a KeyError in __delitem__().
Since __setitem__() directly does the job of replacing a null entry by a real package, there is no need to do __delitem__() first. And this would be perfectly thread safe.
A patch is attached (javaimport_threadsafety.diff) |
|
Date |
User |
Action |
Args |
2008-02-20 17:18:02 | admin | link | issue1801802 messages |
2008-02-20 17:18:02 | admin | create | |
|