And optimising compilers.
On Mon, 19 Nov 2018, 10:45 Dr Heinz M. Kabutz Or get rid of pipelining and caches ... :-D
>
> On Sun, 18 Nov 2018 at 23:21, Kodewerk wrote:
>
>> This is all too confusing… can’t you just single thread everything?
>>
>> — Kirk
>>
>>
>> On Nov 18, 2018, at 10:35 AM,
Or get rid of pipelining and caches ... :-D
On Sun, 18 Nov 2018 at 23:21, Kodewerk wrote:
> This is all too confusing… can’t you just single thread everything?
>
> — Kirk
>
>
> On Nov 18, 2018, at 10:35 AM, Vladimir Sitnikov <
> sitnikov.vladi...@gmail.com> wrote:
>
> Jean-Philippe>is a write
This is all too confusing… can’t you just single thread everything?
— Kirk
> On Nov 18, 2018, at 10:35 AM, Vladimir Sitnikov
> wrote:
>
> Jean-Philippe>is a write to value but no read of this value inside the same
> thread, so the write is free to be reordered
>
> It ("reordering") does
Gil and Vladimir, thanks a lot for your time and explanation. This
discussion was very fruitful, at least for me.
W dniu niedziela, 18 listopada 2018 19:35:30 UTC+1 użytkownik Vladimir
Sitnikov napisał:
>
> Jean-Philippe>is a write to value but no read of this value inside the
> same thread,
Jean-Philippe>is a write to value but no read of this value inside the same
thread, so the write is free to be reordered
It ("reordering") does not really matter.
For instance,
17.4.5. Happens-before Order> If the reordering produces results consistent
with a legal execution, it is not illegal.
According to JCIP, a happens-before order also constitutes a safe
publication of the objects involved. Since there is a HB edge between the
put and the get, this leads to a safe publication of the object stored in
the map (safe publication is another JCIP term). JCIP also mentions CM
Well, I was wrong on the internet. (Again).
Vladimir is right, the happens-before is transitive. Regardless of the
order of execution on either side, every field initialization (final or
otherwise) happens-before the put(), and therefor happens-before any
subsequent get() on any thread, such
Hello Vladimir,
On Sunday, November 18, 2018, Vladimir Sitnikov
wrote:
>
>
> In this case that contract is provided by JLS "17.4.3. Programs and
> Program Order" and "17.4.5. Happens-before Order" .
> TL;DR: "If x and y are actions of the same thread and x comes before y in
> program order, then
Gil>I'd be happy
I wish you all the best. I truly adore the way you explain things.
Gil>There is no contract I've found that establishes a
happens-before relationship between the initialization of non-final fields
in some object construction and the put of that object (or of some object
that