Joseph Southwell
8 years ago
So, I am having a weird problem.
This is visual studio 2017, ASIO 1.11 latest from git, I am also using boost 1.64, though I am not using boost's ASIO implementation.
When I use resolver in my first spawned coroutine no further spawned coroutines will ever get started. Simplest example I could workout is attached. There is #define USE_RESOLVER at the top, If you comment it out it will use a defined endpoint and that works fine. I am seeing resolver_op fire after the first coroutine completes (after the resolver has been destructed) and before the second one is dispatched to the strand and the second one never actually runs. I think this is a race condition with the resolver thread but I am having trouble tracking it down.
This is visual studio 2017, ASIO 1.11 latest from git, I am also using boost 1.64, though I am not using boost's ASIO implementation.
When I use resolver in my first spawned coroutine no further spawned coroutines will ever get started. Simplest example I could workout is attached. There is #define USE_RESOLVER at the top, If you comment it out it will use a defined endpoint and that works fine. I am seeing resolver_op fire after the first coroutine completes (after the resolver has been destructed) and before the second one is dispatched to the strand and the second one never actually runs. I think this is a race condition with the resolver thread but I am having trouble tracking it down.