
"vicente.botet" <vicente.botet@wanadoo.fr> writes:
I've read recently about timed locks throwing an exception when there is a timeout. What do you think about this behaviour? Could the thread library provide both?
Interesting idea. It certainly tidies up the code, which is one of my favourite features of exceptions.
What do you think about a try_lock_until, try_lock_for functions
while (polling) try { boost::try_lock_for(100, m1, m2, m3); foo(); polling = false; } catch (timeout_exception& ex) {execute_on_failed(); }
Hmm. Interesting. Have you got some realistic use cases? 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