[RFC][Icedtea-Web]: Fix bug where you can clear cache while plugin is in use.
asu at redhat.com
Wed Mar 16 07:23:38 PDT 2011
----- Original Message -----
> On 03/15/2011 04:29 PM, Andrew Su wrote:
> > Hello Denis,
> > ----- Original Message -----
> >> Hi.
> >>>>> - Is it possible to get a race condition when calling
> >>>>> markNetxRunning in JNLPRuntime. Since this now affects the
> >>>>> plugin and not just javaws, this might be called multiple
> >>>>> times by different threads? if so, I would synchronize it and
> >>>>> since subsequent calls will instantly return if the first
> >>>>> call succeeded in getting the lock, so there won't be much
> >>>>> performance hit.
> >> I think that's a very good idea (making markNetxRunning
> >> synchronized). I don't think we need to worry about performance at
> >> all, seeing how rarely this function is called.
> > It does get called every time it is about to launch an
> > applet/application. but as a counter measure it will return right
> > away if we obtained the lock already.
> Without appropriate synchronization, another thread may not see that
> it's null already. Being a shared variable that's being read and set
> multiple threads, it needs appropriate synchronization.
> Take a look at
Yes, that is what I meant when I said that I will synchronize it. The check for null is so we don't execute the rest of the body not for synchronization purposes.
Well, here's the updated patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7605 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110316/1d8f5d45/20110316_mark_netx_running_for_plugin_v3.patch
More information about the distro-pkg-dev