Added 2 tests.
Added testable flags to thread-safety assertions.
Merge remote-tracking branch 'origin/master'