Re: [Pharo-users] Lock free structures in Pharo

2013-11-14 Thread Igor Stasenko
On 14 November 2013 10:15, Stephan Eggermont wrote: > Reading this code, made me wonder what operations are actually atomic. > Anyone having a good explanation? > > Stephan > > AtomicQueueItem>makeCircular > "Make a receiver circular, i.e. point to itself, > answer the old value o

Re: [Pharo-users] Lock free structures in Pharo

2013-11-14 Thread Camille Teruel
On 14 nov. 2013, at 12:38, Stéphane Ducasse wrote: > You should look in VM code clement / eliot can reply more precisely > but the idea is to see when do you accept to suspend a computation. > In Smalltlak this is after each message. Except for #== and inlined message like #ifTrue:ifFalse: , #

Re: [Pharo-users] Lock free structures in Pharo

2013-11-14 Thread p...@highoctane.be
Clement also told me that the VM only checked for Cmd-. breaks on back jumps. Phil On Thu, Nov 14, 2013 at 11:16 AM, jtuc...@objektfabrik.de < jtuc...@objektfabrik.de> wrote: > Hi Norbert, > > I couldn't have said it any better. For me, this also was interesting, > because I first thought: "Hec

Re: [Pharo-users] Lock free structures in Pharo

2013-11-14 Thread Stéphane Ducasse
You should look in VM code clement / eliot can reply more precisely but the idea is to see when do you accept to suspend a computation. In Smalltlak this is after each message. Stef > Stef, > > Am 14.11.2013 um 12:10 schrieb Stéphane Ducasse : > >> Note that it would be good to have a special

Re: [Pharo-users] Lock free structures in Pharo

2013-11-14 Thread Norbert Hartl
Stef, Am 14.11.2013 um 12:10 schrieb Stéphane Ducasse : > Note that it would be good to have a special syntactic construct for that > because now > we rely on the way the compiler works to ensure such properties and it means > that > an accessor and a direct access are not semantically equals.

Re: [Pharo-users] Lock free structures in Pharo

2013-11-14 Thread Stéphane Ducasse
Note that it would be good to have a special syntactic construct for that because now we rely on the way the compiler works to ensure such properties and it means that an accessor and a direct access are not semantically equals. Stef >> On 14 Nov 2013, at 10:15, Stephan Eggermont wrote: >>

Re: [Pharo-users] Lock free structures in Pharo

2013-11-14 Thread jtuc...@objektfabrik.de
Am 14.11.13 11:19, schrieb Norbert Hartl: Am 14.11.2013 um 11:16 schrieb jtuc...@objektfabrik.de: Hi Norbert, I couldn't have said it any better. For me, this also was interesting, because I first thought: "Heck, how would I make anything atomic anyways?". And that question still stands: is t

[Pharo-users] Lock free structures in Pharo

2013-11-14 Thread Stephan Eggermont
Marcus wrote: >-> no message send >-> no back jump bytecode > >therefore it can not be interrupted and process switches can not happen >between the statements. Ok, that’s not too difficult. Thank you Stephan

Re: [Pharo-users] Lock free structures in Pharo

2013-11-14 Thread Norbert Hartl
Am 14.11.2013 um 11:16 schrieb jtuc...@objektfabrik.de: > Hi Norbert, > > I couldn't have said it any better. For me, this also was interesting, > because I first thought: "Heck, how would I make anything atomic anyways?". > And that question still stands: is there a way to make something atomi

Re: [Pharo-users] Lock free structures in Pharo

2013-11-14 Thread jtuc...@objektfabrik.de
Hi Norbert, I couldn't have said it any better. For me, this also was interesting, because I first thought: "Heck, how would I make anything atomic anyways?". And that question still stands: is there a way to make something atomic that includes message sends? I guess #critical is not the soluti

Re: [Pharo-users] Lock free structures in Pharo

2013-11-14 Thread Norbert Hartl
Am 14.11.2013 um 10:25 schrieb Marcus Denker : > > On 14 Nov 2013, at 10:15, Stephan Eggermont wrote: > >> Reading this code, made me wonder what operations are actually atomic. >> Anyone having a good explanation? >> >> Stephan >> >> AtomicQueueItem>makeCircular >> "Make a receiver cir

Re: [Pharo-users] Lock free structures in Pharo

2013-11-14 Thread Marcus Denker
On 14 Nov 2013, at 10:15, Stephan Eggermont wrote: > Reading this code, made me wonder what operations are actually atomic. > Anyone having a good explanation? > > Stephan > > AtomicQueueItem>makeCircular > "Make a receiver circular, i.e. point to itself, > answer the old value of

[Pharo-users] Lock free structures in Pharo

2013-11-14 Thread Stephan Eggermont
Reading this code, made me wonder what operations are actually atomic. Anyone having a good explanation? Stephan AtomicQueueItem>makeCircular "Make a receiver circular, i.e. point to itself, answer the old value of next variable. Note, this operation should be atomic"