If it takes a while to start one of the threads, another thread might already have passed the usleep() call previously used and re-enabled cancelability so that the loop that checked for it would never terminate.
If it takes a while to start one of the threads, another thread might already have passed the usleep() call previously used and re-enabled cancelability so that the loop that checked for it would never terminate.