Boost logo

Boost Users :

From: Anthony Williams (anthony.ajw_at_[hidden])
Date: 2008-08-15 16:17:27


Christian Larsen <contact_at_[hidden]> writes:

> Anthony Williams skrev:
>> Christian Larsen <contact_at_[hidden]> writes:
> [snip]
>>> My question is whether there is a
>>> smarter way to reset the interruption request (if any) than this:
>>>
>>> try
>>> {
>>> boost::this_thread::interruption_point();
>>> }
>>> catch (boost::thread_interrupted&)
>>> {
>>> // ignore
>>> }
> [snip]
>>
>> That's essentially the only way to do it, but if interruption is
>> disabled, even that won't work.
>
> Ok, thanks for the reply.
>
> Would there be any chance that a function for this would be added? I
> mean, it doesn't feel right to throw and catch an exception for
> controlling program flow (haven't benchmarked, but it has to be more
> expensive than flipping a flag). Couldn't a reset functionality easily
> be added?

Yes, it could be added. I've put it on my list.

Anthony

-- 
Anthony Williams            | Just Software Solutions Ltd
Custom Software Development | http://www.justsoftwaresolutions.co.uk
Registered in England, Company Number 5478976.
Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL

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