-
Notifications
You must be signed in to change notification settings - Fork 107
Description
My app is multithreaded and any thread can arbitrarily make an RPC or publish info.
Are transmissions automatically serialized on a common asio strand? At the moment I require that all transmissions be queued and have a thread that does nothing but pop requests from the queue and send them to websocket-cpp. I would love to simplify this code if this queueing process is redundant.
On the callee side: I assume the RPC execution context is one of the io_context's threads, so all of my RPC handlers simply pass the requests onto a work queue. Again, this is clumsy if unneeded, though of course a more general mechanism is harder to design.
In either case: could you clarify what's going on so I can write the right thing? The examples are simple for important pedagogical reasons but don't illuminate these issues.
Thanks,
d