test_thread thread (test_thread.py) concurrent threads locks