On 12/15/18 1:18 AM, Christophe Bailly via Boost wrote:
I have worked on a prototype to avoid the current limitations with async code, the use of sync + async code is really difficult, it does not co-exist easily. If you introduce async code, you have to migrate all your code ... There are alternative solutions (threads..) but here is a suggestion to overcome these limitations.
This the following an accurate description? The user has to inject wait_socket_recv() before any recv() call, which will wait until the socket is readable. The wait conceptually yields the current coroutine, allowing other readable I/O requests to continue. Internally the wait blocks on select(), which waits for any pending I/O requests. Once a socket becomes readable, its associated coroutine is allowed to continue. Unlike Boost.Asio, which requires the user to pass a future or a yield context around in the application code, your approach is to store similiar information in global containers. If that is an accurate description, then the use of global containers clearly presents a scalability issue. Your prototype assumes a single threaded application.