>> And double locking does not solve anything. Not in Java, not in C#
>> and not in C++.
>
> Double-checked locking? Works fine in Java (1.5+, and in practice 1.4+),
> so long as you do it right.
>>> And double locking does not solve anything. Not in Java, not in C#
>>> and not in C++.
[quoted text clipped - 3 lines]
>
> It does not.
Does so.
> It only works in the modified form with the volatile keyword.
Yes, correctly implemented it works correctly...
Tom Hawtin
Arne Vajhøj - 14 Jan 2007 20:14 GMT
>>>> And double locking does not solve anything. Not in Java, not in C#
>>>> and not in C++.
[quoted text clipped - 9 lines]
>
> Yes, correctly implemented it works correctly...
It is no longer the original double checked locking.
Arne
Lew - 14 Jan 2007 20:23 GMT
Arne Vajhøj wrote:
>> And double locking does not solve anything. Not in Java, not in C#
>> and not in C++.
> Double-checked locking? Works fine in Java (1.5+, and in practice
> 1.4+), so long as you do it right.
>> It does not.
> Does so.
>> It only works in the modified form with the volatile keyword
> Yes, correctly implemented it works correctly...
Time out. You guys agree - double-checked locking works, if all restrictions
and limitations are observed. Not if used "by itself", which some might call
"incorrectly", but if used "modified, with volatile", which some might call
"correctly".
- Lew "the Peacemaker"