Possible language changes

Douglas C. Schmidt schmidt at dre.vanderbilt.edu
Fri Mar 4 04:07:55 GMT 2005


Hi Jim,

> From: "Douglas C. Schmidt" <schmidt at dre.vanderbilt.edu>
> >   /**
> >    * Send @a signum to @a thread_id.  Not supported on platforms
> >    * that do not have advanced signal support, such as Win32.
> >    * Can throw various exceptions on failure (TBD).
> >    */
> >   void signal (thread_t thread_id,
> >                int signum);
> 
> Your signal handling example above requires advanced signal support.

Right.  That's why my example also said this:

  /// The following are methods that cannot be implemented portably as
  /// a library, but are available on many operating systems.
  
> Do you have a more generalized solution to signal handling in a threaded
> application? For instance, what would you provide for Win32?  It is 
> certainly a platform which cannot currently be ignored.

As I alluded to above, it's REALLY hard to provide an
efficient/simple/portable/generalized solution for this.  That's why I
recommend not trying to mandate signal handling as part of the core
threading abstraction in the C++ standard.  It looks like Ada does a
nice job of coming up with a generalized solution.  It's not clear (to
me at least) that typical C++ programmers would be willing to incur the
time/space complexity of the runtime system needed to implement this
type of capability, which I think may be at the heart of Doug Lea's
earlier comments about focusing primarily on "essential" capabilities as
the basis for the core threading features in the C++ standard.

Take care,

     Doug







More information about the cpp-threads mailing list