Boost logo

Boost :

Subject: Re: [boost] [future|interprocess] Could futures live in shared memory and synchronize process?
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2009-02-17 11:57:31


vicente.botet wrote:
> Hi,
>
> As a future is a synchronization mechanism, I was wondering if
> futures are intrisic of mutil-threaded programs and so they
> live in the protected process memory or if the concept can be
> used in a multi-process context and have futures/promises
> living on shared memory.

I don't see why do we want to have a future in shared memory. Do you see
any use case for this?

A future is a handle of a concurrency unit that has spawned another
concurrency unit. A future for processes would be interesting, but
passing/returning values between processes is not easy and using shared
memory consumes at least 1 memory page.

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). Passing
objects between processes is not easy, but there are OS mechanisms that
do similar things like Solaris Doors.

> Best regards,
> _____________________
> Vicente Juan Botet Escribá

Best,

Ion


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk