wrote a nice test for testing thread locking