Topic: virtual inheritance and multi-threading
Author: gi2nospam@mariani.ws (Gianni Mariani)
Date: Fri, 21 Jan 2005 04:31:27 GMT Raw View
I recall seeing some discussion regarding multi-threading support for a
future C++ standard.
I'd like to know if this discussion includes a core language extension,
similar to virtual inheritance.
In particular, the practice of most thread classes is that the thread
class user is responsible to "start" the thread and "wait" for
completion of the thread.
I have found that these are an endless source of errors but as far as I
can tell there is no language facility to guarentee being the last class
constructed and the first class destructed (oppisite of virtual
inheritance).
This issue also applies to "thead pool" objects as well. Before the
destruction of an object utilizing threads pools can commence, all the
thread-pool objects targetting it must be waited-on and disabled.
To be able to enforce these start/wait rules it would seem that a core
language extension to enable capturing when the most derived object is
constructed (almost completed) and when the most derived object is about
to be destroyed would be really helpful.
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]