Prevent next thread starting before last finished.