
Frank Mori Hess wrote:
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?
That was the case I was referring to. I was talking a bout shared future objects not shared data. Of course, the correct way to implement a process-future would be to share data. But could not pass the future object (which lives in the process that called spawn) to any other process, something that you can do with threads (the thread that waits for completion does not need to be the thread that created the future). And we will need to to create a shared memory that goes away when a process dies (which is not true for POSIX systems). In theory, it could be possible, but it has some rough edges. Regards, Ion