Message1929

Author otmarhumbel
Recipients
Date 2007-09-25.06:47:25
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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)
History
Date User Action Args
2008-02-20 17:18:02adminlinkissue1801802 messages
2008-02-20 17:18:02admincreate