> then check the id upon entering the ctx lock
>
> if ok go on
> if not get ctx again
>
> 100% safe

*LOL* But of course :-)))

> PS: Also when you enter the second block you go to wait and get ctx
again...
>
> Plus frankly the possibility of that happening doesn't prevent me from
> sleeping at night :))) (the 2 blocks are contiguous AND when you enter and
> go to sleep you get the ctx again) so it would need to be a thread that
does
> the whole id changing thing (like remove ctx) meaning the whole the
> invocation layer while one is stuck at
> "
> sync(cache)
>
> }
> file://right here, stuck while the other does the *whole* invocation layer
> sync(ctx) {
> }
>
> again remember that as soon as the thread enters the second it means you
get
> a ctx again (you go to wait) and that is safe, I really don't see a
problem
> with that, probability 1.10^-9.

Cool. Just add the extra id check and I am happy.

/Rickard



Reply via email to