Possible language changes
jimmaureenrogers at att.net
jimmaureenrogers at att.net
Wed Mar 2 04:31:13 GMT 2005
-------------- Original message from Doug Lea <dl at cs.oswego.edu>: --------------
>
> Thanks for confirming that it is hopeless to aim for agreement at
> higher layers! Some people want something Ada-like,
> some pthreads-like. Etc. Can't win. (Exactly as discussed
> in my talk at the VEE workshop last fall. See
> http://gee.cs.oswego.edu/dl/cpjslides/lines.pdf or
> http://www.research.ibm.com/vee04/talks.html).
>
> I think that the best that can be done at layer 3 is to define
> some simple and basic notion of a thread:
> create, start, destruct, get/set priorities etc,
> block, unblock, and associate thread-locals.
>
> And probably some minimal integration of these with lower layers:
> Memory effects of starting and terminating, dealing with
> exceptions. etc.
>
> Can anyone make a good case for doing more ethan this?
Of course we can.
History tells us that low level constructs such as these will
eventually generate a number of libraries to implement higher
level concurrency abstractions.
Eventually C++ will need to develop a concurrency equivalent to
the STL; a standardized Threading Library. Why suffer the
incompatibilities of many libraries followed by an eventual
standardization? This would only repeat C++ history that does not
need to be repeated.
There are already several threading libraries available for C++.
Implementation of low level concurrency abstractions will simply
cause more threading libraries to be created.
Is it really necessary to define a perfect threading approach for
C++, or is it sufficient to define a very good threading approach?
I believe that a very good approach is achievable and useable within
a reasonable time frame. Perfection will never be achieved.
Jim Rogers
More information about the cpp-threads
mailing list