Improved performance by avoiding busy waiting.