I can't change the function so it will check the token, that is my main
problem. I want to be able to stop the execution from outside the function.
Thank you anyway,
Vadim.
From: boost-users-bounces@lists.boost.org
[mailto:boost-users-bounces@lists.boost.org] On Behalf Of Ovanes Markarian
Sent: Monday, December 07, 2009 18:09
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] Newbie question
I would suggest to introduce a Cancellation Token as parameter to both
functions. If one function becomes ready it sets the cancelation flag to
true, so that other function can check it and exit. In the most simple case
it can be a volatile boolean value passed by reference to both functions.
Hope that helps,
Ovanes
On Mon, Dec 7, 2009 at 1:44 PM, Vadim Ryvchin