Boost logo

Boost :

Subject: Re: [boost] [future|interprocess] Could futures live in shared memory and synchronize process?
From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2009-02-18 08:43:49

Hash: SHA1

On Tuesday 17 February 2009, Ion Gaztañaga wrote:
> vicente.botet wrote:
> >> However, I can find useful a future returning "int", just because main
> >> returns int and a process could spawn other processes and obtain futures
> >> to them (Boost.Process child is a an example of this approach).
> >
> > Yes, I see but the future needed in this case will be internal to the
> > spawning process, isnt't it?
> Yes, ownership of thread futures can be passed to other threads but I
> don't see this useful/possible for processes, we could duplicate process
> handles, but I don't see handles could be sharable. Maybe PIDs might be
> placed in shared memory and futures could be made of them.

If you were implementing an interprocess future that only supported POD types,
wouldn't the POD object used for the future's value just sit in the shared
memory? The future wouldn't need any pids. It just needs a shared_ptr,
mutex, and condition, all of which are provided by interprocess, aren't they?
Version: GnuPG v1.4.9 (GNU/Linux)


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