Fix synchronization to use BlockingQueue instead of wait/notify.
All dead locking will be solved by this fix.