swap(datum_, rhs);
}
+ /**
+ * Assign another datum and return the original value. Recommended
+ * because it keeps the mutex held only briefly.
+ */
+ T exchange(T&& rhs) {
+ swap(rhs);
+ return std::move(rhs);
+ }
+
/**
* Copies datum to a given target.
*/