Issue1801802
Created on 2007-09-25.06:47:25 by otmarhumbel, last changed 2007-09-28.15:02:43 by otmarhumbel.
File name |
Uploaded |
Description |
Edit |
Remove |
javaimport_threadsafety.diff
|
otmarhumbel,
2007-09-25.06:47:25
|
This diff against revision 3537 of trunk fixes the problem |
|
|
msg1929 (view) |
Author: Oti Humbel (otmarhumbel) |
Date: 2007-09-25.06:47:25 |
|
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)
|
msg1930 (view) |
Author: Oti Humbel (otmarhumbel) |
Date: 2007-09-28.15:02:43 |
|
fixed on trunk in r3543
merged to Release_2_2maint branch (using svnmerge.py) in r3544
|
|
Date |
User |
Action |
Args |
2007-09-25 06:47:25 | otmarhumbel | create | |
|