Fix buggy code in thread locking
1 file changed