FOR-SQUASH: Replace Thread.delay with Mutex/Condition

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>