Testing thread locks.