Should be threadsafe.

Uses condition variable to make the call to the ServerInterface thread
safe.