[server][EventSemaphore] Add a return value to post() and wait().