All this is quite interesting (and makes my head hurt), maybe we should implement this as a helper class in the image, along side the other lock free stuff ?
On 04 Apr 2014, at 19:29, Igor Stasenko <siguctua@gmail.com> wrote:
> On 4 April 2014 18:31, Sven Van Caekenberghe <sven@stfx.eu> wrote:
> Just for the sake of discussion, you try to prevent interruptions by using assignments, right ? But you still need #== which seems like a (potential) message send, which brings us back to the other arguments in this thread. Furthermore, the dummy value must be different for each of the processes/threads entering, no ?
>
> dummy is placeholder used solely to detect that counter is 'locked' via #== comparison..
> can be any object not really matters if you share it among processes or not,
> since it carries no state.
>
> #== , whileTrue: .. as well as any other message sends potentially is subject of being interrupted.. but there's nothing wrong with it, as long as two assignments (in a row)
> don't have chance to be interrupted.