From: Daniel Nugent Date: 2006-02-22T10:13:45+09:00 Subject: Re: [ANN] lazy.rb 0.9.5 -- transparent futures! Right, then there's no purpouse to being able to put the lock down. I think I thought that the lock was class level instead of instance level. BTW: Could you point me in the direction of some circular programming examples? It sounds like an interesting technique, but the papers on the net all seem to be in post script and I don't care to futz with GhostWriter again. On 2/21/06, MenTaLguY wrote: > On Wed, 2006-02-22 at 09:07 +0900, Daniel Nugent wrote: > > What's the purpouse of the spinlock in __synchronize__? > > > To keep a Future's block from evaluating several times in parallel? > > s/Future/Promise/, and you've got it. > > It ensures that each promise only ever gets evaluated once, even when > multiple threads demand its result at the same time. > > Nothing to do with futures in particular; I only require threadsafe for > futures because using futures guarantees that your program will have > multiple threads. > > -mental > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.1 (GNU/Linux) > > iD8DBQBD+7GqSuZBmZzm14ERAr9RAKDaPWxo4bWt1VQTslG7rh6cOa+glgCdHmZZ > 3luo9rohBNy0c0WnC5Dp+v4= > =R/te > -----END PGP SIGNATURE----- > > > -- -Dan Nugent