function posted to boost::asio::io_service::strand not executed -
function posted to boost::asio::io_service::strand not executed -
i using boost::asio
in quite complex scenario , experiencing problem method posted boost::asio::io_service::strand
object not executed although several worker threads on io_service
running , idle.
as said, scenario complex, i'm still trying develop reasonably little repro scenario. conditions follows:
one io_service running , has work-object assigned it 4 worker threads assigned io_service (calledio_service::run
on each) several strand objects used post numerous different tasks in of tasks executed via strands, new tasks posted strand the whole scheme works , stable, except 1 situation: when calling destructor of 1 of classes, posts abort handler strand (to initiate aborting in sync other taks) , waits until abort done. every 1 time in while happens, abort handler never executed (destructor called invocation of strand object).
i assume problem strand waits executing handler on same thread has been posted. , since thread waiting abort handler executed programme deadlocks.
my questions now: - assumption correct? - there way avoid situation? - how approach problem (having several async tasks running , need abort them synchronously)
thanx lot help!
m.
boost boost-asio deadlock
Comments
Post a Comment