Boost logo

Boost Users :

Subject: Re: [Boost-users] Waiting for multiple events
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2009-12-07 17:34:27


Some months ago I uploaded a portable Wait For Multiple Objects
implementation based on boost.thread in the vault, it seems relevant
to your problem.

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode

On Mon, Dec 7, 2009 at 1:49 PM, Roland Bock <rbock_at_[hidden]> wrote:
> Vadim Guchenko wrote:
>>
>> Hello, All!
>>
>> I want to do something like this:
>>
>> Wrapper wrapper(final_handler);
>> w_handler1 = wrapper.wrap(handler1);
>> ...
>> w_handlerN = wrapper.wrap(handlerN);
>>
>> where the final_handler() must be invoked as soon as all the wrapped
>> handlers handler1() ... handlerN() are invoked through w_handler1() ...
>> w_handlerN() in any order. Is there any existing Boost tool for that?
>
> It is not 100% clear to me what you want, but I'd say you could use
> promise/future from Boost Thread:
>
> http://www.boost.org/doc/libs/1_41_0/doc/html/thread/synchronization.html#thread.synchronization.futures
>
> You would have promise1..N which are set by handler/wrapper1..N.
>
> The final wrapper would have to wait for the synchronous future values 1..N
> and could proceed afterwards.
>
> HTH
>
> Roland
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net