|
Boost : |
From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2007-03-26 00:59:48
Howard Hinnant wrote:
[...]
> In essence, we're asking the C community to standardize the semantics
> of try/finally (no catch, no throw)
Nope. It's more like
http://www.ohse.de/uwe/articles/gcc-attributes.html#var-cleanup
or, in pthread/C++ speak, just
/*
* See http://www.cuj.com/documents/s=8000/cujcexp1812alexandr/
*/
#define pthread_cleanup_push(routine, arg) \
{ \
scope_guard_impl const & _guard = make_scope_guard(arg, routine);
#define pthread_cleanup_pop(execute) \
if (!execute) _guard.dismiss(); \
}
regards,
alexander.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk