Possible language changes

Kevlin Henney kevlin at curbralan.com
Fri Mar 4 06:37:13 GMT 2005


In message <4226FDB0.9040704 at cs.oswego.edu>, Doug Lea <dl at cs.oswego.edu> 
writes
>
>Plea for help: Doug Schmidt and/or others. Could you sketch out
>a candidate Thread class?

I have attached a talk from last year where I outline a model that is 
based on a fairly typical view of threads, but presents an approach that 
is more in line with the ideas of generic programming, as articulated in 
the STL.

>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.

The most common and practical model is that a thread, but not its 
containing process, is killed on the escape of an exception. Propagating 
exceptions across threads is unnecessarily tricky and creates more 
problems than it solves. However, a thread should not die silently, so 
the thread model I outlined below accommodates the notion of an 
unexpected-exception handler per thread (in line with the standard 
language per process) and throws an exception (one indicating unexpected 
thread death, not the original thread's uncaught exception) on join 
instead of yielding a value.

Kevlin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: More C++ Threading.pdf
Type: application/octet-stream
Size: 426246 bytes
Desc: More C++ Threading.pdf
Url : http://shadbolt.decadentplace.org.uk/pipermail/cpp-threads/attachments/20050304/2b2b6646/MoreCThreading.obj
-------------- next part --------------

-- 
____________________________________________________________

   Kevlin Henney                   phone:  +44 117 942 2990
   mailto:kevlin at curbralan.com     mobile: +44 7801 073 508
   http://www.curbralan.com        fax:    +44 870 052 2289
   Curbralan: Consultancy + Training + Development + Review
____________________________________________________________


More information about the cpp-threads mailing list