
-----BEGIN PGP SIGNED MESSAGE----- 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? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkmcEJUACgkQ5vihyNWuA4X3KgCgluVqZR17MKiuCsAhzEK1GyZC yu8An1ieCv9cxV4BB7zjSYngjrpw+7LW =ftG1 -----END PGP SIGNATURE-----