Prevent multiple threads from possibly creating waiting problems.