Possible language changes

jimmaureenrogers at att.net jimmaureenrogers at att.net
Thu Mar 3 14:59:31 GMT 2005


-------------- Original message from Doug Lea <dl at cs.oswego.edu>: -------------- 

> One open issue that we might be able to settle quickly is 
> how exception mechanics fit in with this (i.e., mainly, what 
> happens when one thread abruptly terminates with exception). 
> I think uC++ has a good story to tell about it. 
> 

I do not know if this is the direction you want to take for C++,
but the Ada standard restricts exceptions to the task (aka thread)
in which they are raised. Thus, an unhandled exception will result
in the termination of the task it occured in, but will not terminate
other tasks.

This model simplifies exception handling, making exceptions 
essentially single-threaded. It also supports the concept that 
communications between threads only occur through well defined
message passing mechanisms explicitly defined by the programmer.

Propogating exceptions from one thread to another creates a set
of back-channel states and communication that can greatly complicate
the job of developing robust threaded applications.

Jim Rogers






More information about the cpp-threads mailing list