On 8/25/11 15:42 , Niclas Hedhman wrote:
Who knows??
I think there is at least one problem; If threadA is interrupted
between the lines in returnInstance(), then the 'next' field in the
now 'first' referenced CompositeMethodInstance, will point to.... yes,
what?? Meaning that another thread would take the returned value, but
set the 'first' to a spurious value, and only a thread after that
might be buggered up. Yes, a long shot, and possibly hard to verify or
trigger...
No, because of the getAndSet() thing that can't happen. The second
interrupting thread would get the value that was set by the first one,
so that's fine.
AFAIK anyway...
/Rickard
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev