From: Wolfgang Bangerth
+ New: deal.II now uses a new threading
+ scheme. The new scheme is simpler to use, and in particular
+ more flexible in some cases where only one thread is started,
+ or where a thread is completely detached, since we got rid of
+ the
New: deal.II now makes use of some parts of
the boost library, which is
- supposed to be a testground for the next generation C++ stanard
+ supposed to be a testground for the next generation C++ standard
library. The parts which we use are now in
- Changed: In POSIX mode, when the General
+
ThreadManager
class and now only store handles
+ to individual threads (which can be discarded, or added to a
+ ThreadGroup
variable that is able to wait for a
+ whole set of threads at once.
+
+ The new scheme also implements a much needed feature: calling
+ functions on a new thread that return values. Previously, such
+ functions needed to be written in a way that they return their
+ return value through an additional reference parameter. This
+ was inflexible if one wanted to call functions that already
+ exist. This restriction is now lifted: such functions can be
+ called, and the return value can be accessed once the thread
+ has finished.
+
+ Some documentation for the new scheme can be found
+ on this
+ page.
+
+ (WB 2003/02/06)
+ contrib/boost/include/boost_local/
and can be
referenced from within your programs. The directory contains
@@ -140,7 +166,8 @@ contributor's names are abbreviated by WB (Wolfgang Bangerth), GK
DEAL_II_USE_MT
, when --with-multithreading
was
given as argument to ./configure
. Tests in the code
therefore looked like #ifdef DEAL_II_USE_MT
. This has been
- changed so that the variable is always defined, but its value is now equal to 1
+ changed so that the variable is always defined, but its value is now
+ equal to 1
when multithreading was requested, and zero otherwise. The reason for
this is that you can now write if (DEAL_II_USE_MT && ...)
conditions, and need not interleave if-else clauses from regular code
@@ -407,14 +434,15 @@ contributor's names are abbreviated by WB (Wolfgang Bangerth), GK
ThreadManager
- class created a new thread through pthread_create
,
- it only checked for the error code and aborted if it was non-zero. Now, it
- checks whether the error code is EAGAIN
and simply
- retries the call if this is the case. This may, in rare cases, lead to a
- deadlock or an infinite loop, but will usually just wait until the respective
- resources for thread creation are available from the operating system and will
- then succeed.
+ Changed: In POSIX mode, when the ThreadManager
class created a new thread through
+ pthread_create
, it only checked for the
+ error code and aborted if it was non-zero. Now, it checks whether the
+ error code is EAGAIN
and simply retries the
+ call if this is the case. This may, in rare cases, lead to a deadlock or
+ an infinite loop, but will usually just wait until the respective
+ resources for thread creation are available from the operating system
+ and will then succeed.
(WB 2002/11/13)
- Extended: Previously, the Threads::PosixThreadBarrier
+ Extended: Previously, the Threads::PosixThreadBarrier
class could not be used at all (they threw exceptions), if your system
did not have the respective POSIX functions. This restriction is lifted
for the special case that you give one as the number of parties that
@@ -920,7 +949,7 @@ contributor's names are abbreviated by WB (Wolfgang Bangerth), GK
Changed: The FEValues::get_cell
and
FEValues::get_face
functions have
- been removed, since they limited our inability to use this
+ been removed, since they limited our ability to use this
class for other types of DoFHandlers, for example future
extensions for hp elements.