<h3>Specific improvements</h3>
<ol>
+<li> New: There is now a new function Threads::Thread::valid that can be used
+to query whether the thread object has been assigned a thread.
+<br>
+(Wolfgang Bangerth 2011/07/01)
+
<li> New: The new function GridGenerator::merge_triangulations can be used to compose
coarse meshes from simpler ones by merging their cells into a single
triangulation object.
* have used the default
* constructor of this class
* and have not assigned a
- * thread object to it.
+ * thread object to it (i.e. if
+ * the valid() function would
+ * return false).
*/
void join () const
{
- AssertThrow (thread_descriptor, ExcNoThread());
+ AssertThrow (valid(), ExcNoThread());
thread_descriptor->join ();
}
return thread_descriptor->ret_val.get();
}
+ /**
+ * Return true if this object
+ * has had a thread associated
+ * with it, either by using the
+ * non-default constructor or
+ * by assignment.
+ */
+ bool valid () const
+ {
+ return static_cast<bool>(thread_descriptor);
+ }
+
/**
* Check for equality of thread