
"Preston A. Elder" <prez@neuromancy.net> writes:
On Wed, 14 Nov 2007 03:22:29 +0000, Preston A. Elder wrote:
So, is it possible to get this fixed? :)
interruption_requested() tells me that), I should be able to cancel the
.. And while I'm at it, a way to cancel pending interrupts would also be good. If I know an interrupt has been requested (hell, thread- pending interrupt and take action myself. Rather than having to acquire a lock spuriously so I can get interrupted (which clears the pending interrupt) and catch the exception to THEN take action.
It's a little messy, but try { this_thread::interruption_point(); } catch(thread_interrupted const&) {} does the trick. You could easily wrap it in a function. However, your code might be interrupted again straight away, so it's not 100% reliable. Why do you need this? Anthony -- Anthony Williams Just Software Solutions Ltd - http://www.justsoftwaresolutions.co.uk Registered in England, Company Number 5478976. Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL