Implementation of C++0x's "future" syntax
Daniel Keep
daniel.keep+lists at gmail.com
Sun Jan 14 18:59:54 PST 2007
Frits van Bommel wrote:
> I _really_ think FutureResult!() should be heap-allocated. If you want,
> you can even make it a class derived from Thread so no extra allocations
> need to be made.
*Bangs head*
Of course, you're absolutely right. *Curses.* I suppose the easiest
way to solve it is to turn FutureResult into a class so that it's
heap-allocated. You're right I could use a subclass of Thread, but I
don't want to expose anything other than the .value/.wait method
Pity, too, since thanks to that optimisation, this would have actually
been pretty efficient :3
-- Daniel
More information about the Digitalmars-d-announce
mailing list