modify the mechanism for thread concurrence