
On Thu, Mar 15, 2007 at 08:24:43AM +0100, Oliver.Kowalke@qimonda.com wrote:
I've tested your implementation with a thread and I get sometimes an segmentation fault (linux, gcc-4.1.0).
Thanks Oliver, I'll get that fixed this afternoon.
There is a new version of my future implementation at: http://braddock.com/~braddock/future/ CHANGES: -fixed this seg-fault problem that Oliver found -added a bunch of new unit tests, including some multi-thread ones which exercise various timing permutations. -added support for automatic conversions of types which are assignable, as discussed with Frank...ie: promise<int> p; future<long> lf(p); future<unsigned char> ucf(p); I learned a lot from Frank's libpoet implementation for this typing magic, but tried to do things a bit tighter. There is no future "proxying" or "chaining" of futures, per se, instead all future references point to the same implementation object under the hood, but do abstract the actual retrieval of the value. The effect is largely the same. The promise/future split helps a lot. I haven't done the same assignment type conversions to the promise class yet, but I suppose I should. Braddock Gaskill Dockside Vision Inc