This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: exceptions and threads
- To: "egcs at cygnus dot com" <egcs at cygnus dot com>
- Subject: Re: exceptions and threads
- From: "Andrew Zabolotny" <bit at freya dot etu dot ru>
- Date: Sat, 13 Dec 97 18:30:07 +0400
- Reply-To: egcs at cygnus dot com
On Fri, 12 Dec 1997 18:11:30 +0100, Christian Millour wrote:
>> On the two most
>> advanced platforms for multithreaded programming, Solaris 2.6 and
>> Digital Unix-latest, when you cancel a thread that is running C++
>> code, destructors are automatically invoked and the stack is unwound
>> until the thread entry point (the function handed to
>> pthread_create()).
>This is cool and the way it should be... Does it work even in Async
>Cancel mode ?
a) imho, this should not work for async cancel mode... otherwise you will
have no way to shutdown
a single thread which has locked (maybe even as a result of a previous
async cancel signal)
b) does posix threads have a mechanism for sending signals *across
threads*?
This way it becomes easy (throw'ing exceptions from signal handlers should
work, imho, provided you
have frame unwind info for the signal handler).
c) If gcc will be involved in such things, wouldn't it be great to make
the thread-stuff visible to the outer-world
too (i.e. a almost-standard thread library with gcc -- maybe inside
libgcc)? Anyway, gcc will need such
a library for internal needs.
Greetings,
_\ndy@teamOS/2