Re: [picocontainer-dev] Commit 5799 Race Condition Fix....

peter royal <[email protected]> Mon, 7 Nov 2011 19:42:01 -0600
Newsgroups gmane.comp.java.picocontainer.devel
Message-ID <[email protected]>
--Apple-Mail-D73E68B4-E533-4F45-84A8-E39256DE82BF
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

it's safe in modern vms as long as injectionMembers is declared volatile

-pete

--=20
(peter.royal|osi)@pobox.com - http://fotap.org/~osi

On Nov 7, 2011, at 7:31 PM, Paul Hammant <[email protected]> wrote:

> I eliminated the situation I was getting in a production deployment.  I'm n=
ot sure what you mean Mike.
>=20
> -ph
>=20
> On Mon, Nov 7, 2011 at 6:43 PM, Michael Rimov <[email protected]> wrot=
e:
> Paul,
>=20
> I was looking @ the diffs....  and this code in Iterative adapter:
>=20
>       if (injectionMembers =3D=3D null) {
>            synchronized (this) {
>                if (injectionMembers =3D=3D null) {
>                    initializeInjectionMembersAndTypeLists();
>                }
>            }
>        }
>=20
> Isn't that double-check locking and not really solving the race condition?=

> Or is Boolean assignment exempt from this kind of situation?
>=20
>=20
> -Mike
>=20
>=20
>=20
> -----Original Message-----
> From: Paul Hammant [mailto:[email protected]]
> Sent: Monday, November 07, 2011 11:53 AM
> To: dev-qxt/[email protected]
> Subject: Re: [picocontainer-dev] Release of Pico 2.14
>=20
> My bad - I've only just done the nexus 'approval'.  Give it four hours or
> so.  Meanwhile build from source :
>=20
>     http://svn.codehaus.org/picocontainer/java/2.x/tags/picocontainer-2.14=
/
>     mvn clean install -DskipTests -Preporting
>=20
> On Mon, Nov 7, 2011 at 1:28 PM, Simon Brandhof <[email protected]>
> wrote:
> > Hi Paul,
> >
> > Will this release be deployed in Maven repository ?
> >
> > Thanks
> >
> >
> > On 7 November 2011 19:04, Paul Hammant <[email protected]> wrote:
> >>
> >> Hey Mike.  The answer is I'm not sure.  It's pretty up to date - go
> >> for it:  The stuff that's in the latest release isn't in 3.x / Git
> >> yet.
> >>
> >> - Paul
> >>
> >> On Mon, Nov 7, 2011 at 10:38 AM, Michael Rimov
> >> <[email protected]>
> >> wrote:
> >> > Hey Paul,
> >> >
> >> > What is the last change you ported over to Pico 3?
> >> >
> >> > I'll be happy to manually port based on the diffs, but I wanted to
> >> > make sure before I started that I wasn't duplicating efforts.
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe from this list, please visit:
> >>
> >>    http://xircles.codehaus.org/manage_email
> >>
> >>
> >
> >
>=20
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>=20
>    http://xircles.codehaus.org/manage_email
>=20
>=20
>=20
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>=20
>    http://xircles.codehaus.org/manage_email
>=20
>=20
>=20

--Apple-Mail-D73E68B4-E533-4F45-84A8-E39256DE82BF
Content-Transfer-Encoding: 7bit
Content-Type: text/html;
	charset=utf-8

<html><head></head><body bgcolor="#FFFFFF"><div>it's safe in modern vms as long as injectionMembers is declared volatile</div><div><br></div><div>-pete<br><br>--&nbsp;<div>(peter.royal|osi)@pobox.com - <a href="http://fotap.org/~osi">http://fotap.org/~osi</a></div></div><div><br>On Nov 7, 2011, at 7:31 PM, Paul Hammant &lt;<a href="mailto:[email protected]">[email protected]</a>&gt; wrote:<br><br></div><div></div><blockquote type="cite"><div>I eliminated the situation I was getting in a production deployment. &nbsp;I'm not sure what you mean Mike.<div><br></div><div>-ph<br><br><div class="gmail_quote">On Mon, Nov 7, 2011 at 6:43 PM, Michael Rimov <span dir="ltr">&lt;<a href="mailto:[email protected]">[email protected]</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Paul,<br>
<br>
I was looking @ the diffs.... &nbsp;and this code in Iterative adapter:<br>
<br>
 &nbsp; &nbsp; &nbsp; if (injectionMembers == null) {<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;synchronized (this) {<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (injectionMembers == null) {<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;initializeInjectionMembersAndTypeLists();<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
 &nbsp; &nbsp; &nbsp; &nbsp;}<br>
<br>
Isn't that double-check locking and not really solving the race condition?<br>
Or is Boolean assignment exempt from this kind of situation?<br>
<br>
<br>
-Mike<br>
<br>
<br>
<br>
-----Original Message-----<br>
From: Paul Hammant [mailto:<a href="mailto:[email protected]">[email protected]</a>]<br>
Sent: Monday, November 07, 2011 11:53 AM<br>
To: <a href="mailto:dev-qxt/[email protected]">dev-qxt/[email protected]</a><br>
Subject: Re: [picocontainer-dev] Release of Pico 2.14<br>
<br>
My bad - I've only just done the nexus 'approval'. &nbsp;Give it four hours or<br>
so. &nbsp;Meanwhile build from source :<br>
<br>
 &nbsp; &nbsp; <a href="http://svn.codehaus.org/picocontainer/java/2.x/tags/picocontainer-2.14/" target="_blank">http://svn.codehaus.org/picocontainer/java/2.x/tags/picocontainer-2.14/</a><br>
 &nbsp; &nbsp; mvn clean install -DskipTests -Preporting<br>
<br>
On Mon, Nov 7, 2011 at 1:28 PM, Simon Brandhof &lt;<a href="mailto:[email protected]">[email protected]</a>&gt;<br>
wrote:<br>
&gt; Hi Paul,<br>
&gt;<br>
&gt; Will this release be deployed in Maven repository ?<br>
&gt;<br>
&gt; Thanks<br>
&gt;<br>
&gt;<br>
&gt; On 7 November 2011 19:04, Paul Hammant &lt;<a href="mailto:[email protected]">[email protected]</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hey Mike. &nbsp;The answer is I'm not sure. &nbsp;It's pretty up to date - go<br>
&gt;&gt; for it: &nbsp;The stuff that's in the latest release isn't in 3.x / Git<br>
&gt;&gt; yet.<br>
&gt;&gt;<br>
&gt;&gt; - Paul<br>
&gt;&gt;<br>
&gt;&gt; On Mon, Nov 7, 2011 at 10:38 AM, Michael Rimov<br>
&gt;&gt; &lt;<a href="mailto:[email protected]">[email protected]</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt; &gt; Hey Paul,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; What is the last change you ported over to Pico 3?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I'll be happy to manually port based on the diffs, but I wanted to<br>
&gt;&gt; &gt; make sure before I started that I wasn't duplicating efforts.<br>
&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt; ---------------------------------------------------------------------<br>
&gt;&gt; To unsubscribe from this list, please visit:<br>
&gt;&gt;<br>
&gt;&gt; &nbsp; &nbsp;<a href="http://xircles.codehaus.org/manage_email" target="_blank">http://xircles.codehaus.org/manage_email</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
<br>
---------------------------------------------------------------------<br>
To unsubscribe from this list, please visit:<br>
<br>
 &nbsp; &nbsp;<a href="http://xircles.codehaus.org/manage_email" target="_blank">http://xircles.codehaus.org/manage_email</a><br>
<br>
<br>
<br>
---------------------------------------------------------------------<br>
To unsubscribe from this list, please visit:<br>
<br>
 &nbsp; &nbsp;<a href="http://xircles.codehaus.org/manage_email" target="_blank">http://xircles.codehaus.org/manage_email</a><br>
<br>
<br>
</blockquote></div><br></div>
</div></blockquote></body></html>
--Apple-Mail-D73E68B4-E533-4F45-84A8-E39256DE82BF--