It's documented, the application consumer must not use wait before stop.
but this is not enforced, so enforce it
Also the code assume start/stop/wait are called from the same thread,
but this is not enforced, so enforce it.
A common broken usage is:
server = oslo.messaging.get_rpc_server(..., executor='eventlet')
t = threading.Thread(target=server.start)
t.daemon = True
t.start()
...foobar code...
server.stop()
server.wait()
With monkey patching, start() will do a context switch and then stop()
is called but start is unfinished, that can cause unexpected behavior.
This patch fixes these issues by making all of this explicit.
Closes-bug: #1465850
Closes-bug: #1466001
Change-Id: I0fc1717e3118bc1cd7b9cd0ccc072251cfb2c038