From: Daniel Nugent Date: 2006-02-22T09:07:22+09:00 Subject: Re: [ANN] lazy.rb 0.9.5 -- transparent futures! Actually, now I'm not so sure that I read that part either.... What's the purpouse of the spinlock in __synchronize__? To keep a Future's block from evaluating several times in parallel? I think I thought it was to keep several futures from evaluating at the same time. On 2/21/06, MenTaLguY wrote: > On Wed, 2006-02-22 at 04:01 +0900, Daniel Nugent wrote: > > In that case, what I want (I'm so damn greedy :D) is to be able to > > raise the exception immediately (in a case where you damned well know > > that you're going to need the value and would prefer to fail early) > > and I see that that's trivial to implement (just have a conditional > > toss the exception up in the thread if some @raise_immediately flag is > > set to true). > > > There's one other thing I was wondering about: What's the prudency of > > adding a method to Future to allow the Future to go back to sleep > > (release the lock, pass the thread)? In this case, I'm considering > > waiting for a resource that some other future/thread might be using, > > or waiting for a port to get some data. (mostly implementation details > > for that library I mentioned, I'll deal with them, but I'm curious if > > there's any issue I'm forgetting). > > Hmm. Could you give me some examples of the behavior you have in mind? > > -mental > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.1 (GNU/Linux) > > iD8DBQBD+5mBSuZBmZzm14ERAhOzAKCLGB4FlLX4gGrymjU51xnmdPUF+wCg22Uj > 6mbmd42ukUab11RpK8WZ3Q4= > =oQMk > -----END PGP SIGNATURE----- > > > -- -Dan Nugent