Functional Muti-threading

janderson askme at me.com
Sun Jan 21 16:08:54 PST 2007


janderson wrote:
> Saaa wrote:
>> I'd recommend looking at the futurism lib in D.announce and see how 
>> much of this is already there ; )
> 
> The futurism library was one of the things that triggered my memory 
> about this idea.  Well done on a great library!
> 
> However I think it could be done better by the compiler in many regards. 
>  Things like futurism would still have their place.
> 
> The difference is that in futurism library threading based on the call, 
> not the function itself.  It doesn't determine if something should be 
> threaded or not, users have to decide on a case by case basis.  It 
> doesn't compound threaded functions together. Its more work for 
> programmer to maintain.  Its harder to read.  Its harder to turn on and 
> off.  Placing sleep-until-done-messages would also need to be done by hand.
> 
> One thought though, you may be able to get pretty close to that for-loop 
> thing with delegates and templates (for compounding).  Although if you 
> had 2 loops in a row (or a loop and threaded function) it wouldn't be 
> able to figure out that these both can be running at once.
> 
> -Joel

Also how would futurism figure out if a function (that isn't labeled) is 
  candidate for multi-threading?

-Joel



More information about the Digitalmars-d mailing list