I tried to write a few wrappers, it isn't so trivial. The main issue is
that we can't be locking a mutex /unless/ the test condition fails,
otherwise it would significantly interfere with the test.
Why would that be the case? all that will do is stop two validation calls from overlapping. What sort of problems would that cause to the test itself?
(I haven't double checked, but if boost uses exceptions to propagate failures, you might have to deal with that if these things happen on background threads)