public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* exceptions and threads
@ 1997-12-09 15:33 Christian Millour
  1997-12-10 10:46 ` Jeffrey A Law
  0 siblings, 1 reply; 5+ messages in thread
From: Christian Millour @ 1997-12-09 15:33 UTC (permalink / raw)
  To: egcs

Hi all. I was wondering whether signalling a thread could be
converted safely into a C++ exception. My gut feeling is that
it cannot, but I'd like your compiler experts confirmation. 

TIA, and congratulations for the impressive work.


^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: exceptions and threads
@ 1997-12-16  1:41 Andrew Zabolotny
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Zabolotny @ 1997-12-16  1:41 UTC (permalink / raw)
  To: egcs

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1997-12-16  1:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-12-09 15:33 exceptions and threads Christian Millour
1997-12-10 10:46 ` Jeffrey A Law
1997-12-11  2:00   ` Wolfram Gloger
1997-12-12 13:04     ` Christian Millour
1997-12-16  1:41 Andrew Zabolotny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).