Re: Implicit thread cancellation
tskorohod@voliacable.com ha scritto:
3) your proposal requires that the signature of functions f1(), f2()
etc. must be changed.
Not always. Exception specifications are rarely used. So if f1 has no
exception specification then it may throw any exception and can be
considered as cancellation point.
As far as I know, cancellation point may potentially require some
overhead. If you implicitly make any function without exception
specification a cancellation point, then you are violating the C++
golden rule "you don't pay for what you don't need" as a multithreaded
program will have to pay such overhead for *every* function call even if
it never uses cancellation. Moreover, it would make it nearly impossible
to efficiently inline function calls unless the programmer puts empty
exception specifications all over the place.
Just my opinion,
Ganesh
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]