Avoid one condition variable in msg-thread impl