Boost logo

Boost :

From: Braddock Gaskill (braddock_at_[hidden])
Date: 2007-03-15 23:30:28

> On Thu, Mar 15, 2007 at 08:24:43AM +0100, Oliver.Kowalke_at_[hidden] 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:

-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
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

Boost list run by bdawes at, gregod at, cpdaniel at, john at