|
Boost : |
From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2003-10-11 09:36:43
Peter Dimov wrote:
[...]
> > ES should have no runtime cost other than some extra info for the
> > search phase. OTOH, enable/disable burns cycles (keystrokes aside
> > for a moment) no matter whether you hit some cancelation point
> > *with cancel request pending* or not. Well, there's a downside...
> > of course. It is just an additional/alternative tool, so to speak.
>
> I'm not seeing the burned cycles (++fs:[8] looks pretty fast) but I may be
> missing and/or misunderstanding something. :-)
pthread_setcancelstate() "can be" expensive. http://tinyurl.com/qk3p
>
> throw() specs have a "required stack frame" cost.
It might be better to burden the callers, I think. Consider:
void x() throw() {
throw 0;
}
void y() throw() {
x();
/**/
x();
}
void z() {
y();
throw 0;
}
A "barrier" [for search phase] can be injected in z() only. In a way,
it's sort of:
void z() {
try {
y();
}
phase_one_catch(...) {
std::unexpected();
}
throw 0;
}
Oder?
regards,
alexander.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk