Fwiw it seems to me that it is not exactly overloading of the return value. That is rather input ambiguity which, unlike winapi MsgWaitForMultipleObjects, takes explicit queue handle as the last wait object which may also be absent. Then if that is really an issue it would probably be more clear if we'd pass a queue handle to wait_message() instead.