[libc-alpha] Fwd: Re: C++ and pthread_create()
terekhov@web.de
terekhov@web.de
Sat Feb 16 21:53:00 GMT 2002
Kaz Kylheku <kaz@ashi.footprints.net> schrieb am 14.02.02:
[...]
> > http://groups.google.com/groups?as_umsgid=DEta8.55%241h5.204%40news.cpqcorp.net
> >
> > "...I think any implementation that doesn't build
> > cancelation (and thread exit) on top of a pervasive
> > common exception infrastructure is broken to the point
> > of being unusable. Nevertheless, the standard doesn't
> > (and can't) require a correct implementation, so those
> > who do it wrong can get away with it as long as their
> > users allow them to. ..."
>
> I seem to remember Dave writing something similar before. I agree.
> In a given programming environment, there should be a single, unified
> mechanism for handling non-local transfers of control with unwinding.
> Everything else should map to that: thread cleanup handlers in C,
> setjmp/longjmp, C++ try/catch and similar features in other languages.
Uhmm.. I am not sure with respect to "jumps"... consider:
http://groups.google.com/groups?as_umsgid=3C2CC94A.503FB8E2%40web.de
"ISO/IEC 14882:1998(E), Pg 347:
'The function signature longjmp(jmp_buf jbuf, int val)
has more restricted behavior in this International
Standard. If any automatic objects would be destroyed
by a thrown exception transferring control to another
(destination) point in the program, then a call to
longjmp( jbuf, val) at the throw point that transfers
control to the same (destination) point has
undefined behavior.'
^^^^^^^^^^^^^^^^^^"
regards,
alexander.
________________________________________________________________
Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr!
Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13
More information about the Libc-alpha
mailing list