Michael Maged

Kevlin Henney kevlin at curbralan.com
Tue Oct 5 14:42:45 BST 2004


In message <16736.5156.317865.804874 at altair.cs.oswego.edu>, Doug Lea 
<dl at cs.oswego.edu> writes
>
>> To hark back to an earlier posting I made (my original library
>> requirements posting, IIRC), there are three levels to standardise:
>>
>> (0) The memory model, which would also include any library elements
>> required to express such concepts as memory barriers and atomic actions.
>>
>> (1) Primitive library threading and synchronisation features at a level
>> above C APIs, but without loss of appropriate expressiveness. This would
>> depend, for its implementation and behaviour, on (0).
>>
>> (2) Higher-level threading and synchronisation facilities, such as
>> thread pools or queues. This should be in terms of features defined at
>> (1).
>>
>> It makes sense to propose (0) separately from (1) and (2). Whether (1)
>> and (2) should be combined is another question, but (2) would strongly
>> depend on (1) so there is some motivation to do that.
>
>Good question. The dead minimum for (1) seems to be to define a Thread
>class, with ways to create, start, block, unblock, block-with-timeout,
>detect termination, and query status. You could then in principle
>build everything in (2), not that most people would want to --
>existing stuff must be able to comply.  Can this be done in a way that
>everyone is guaranteed to love, or at least tolerate?

Tolerance before love, I suspect ;-) But yes, I believe it can be. The 
approach is to focus on requirements before syntax, as I did in my 
original sketch of what would be useful for a library. And the 
requirements I had in mind were both functional and developmental (eg a 
generic programming approach to be favoured over a Java 
transliteration).

Kevlin
-- 
____________________________________________________________

   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