Improved the thread synchronization - Minimal waits.