Hi John The thought experiment is that I have a long GWT chain and two threads are racing down it. Each is looking for the same missing class. The end fallback/lookup is synchronized and so there is only one update at a time, but the new GWT is added to the start of the chain and the second thread is past that point. So when the second gets to the fallback it still thinks the class is missing so it adds it again.
The issue would be that the entry to the target is not synchronized. Does this make sense? mark mlvm-dev-boun...@openjdk.java.net wrote on 08/19/2011 08:05:37 PM: > From: John Rose <john.r.r...@oracle.com> > To: Da Vinci Machine Project <mlvm-dev@openjdk.java.net> > Date: 08/19/2011 08:14 PM > Subject: Re: Thread safety and nethod handle chains > Sent by: mlvm-dev-boun...@openjdk.java.net > > On Aug 11, 2011, at 3:01 PM, Rémi Forax wrote: > > > Yes, you can have duplicate GWTs and > > I'm also interested if someone find a better approach :) > > You can use a custom subclass of MutableCallSite which synchronizes > its updates. > That way two racing threads cannot install duplicate case-handling logic. > Or am I missing the point? > > -- John > _______________________________________________ > mlvm-dev mailing list > mlvm-dev@openjdk.java.net > http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
_______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev