public void sync() {
        if (Thread.currentThread() == thread) {
            return; // no need to wait for self
        }
        SyncTask task = new SyncTask();
        enqueue(task);
        task.await();
    }
<p>Handshakes with the internal thread. If this method is called using
the messenger thread, this will deadlock.</p>
messagebus/src/main/java/com/yahoo/messagebus/Messenger.java