Greg Barron
2013-10-24 01:37:25 UTC
Hi All,
I would like to refer you to this boost::asio bug report:
https://svn.boost.org/trac/boost/ticket/9203
I won't paste the full contents of the bug report into this message.
The executive summary is that the allocation algorithm for the
implementation of asio::strand can and does allocate the
implementation of an existing strand to strands that are subsequently
allocated.
This can have the effect that handlers wrapped in strand (b) will
actually be executed on strand (a). If these handlers are related in
some way (for example with mutexes) and need to not be executed on the
same strand to avoid deadlocks then there is trouble!
Note that this is a change in behaviour from earlier versions of asio.
The behaviour changed with version 1.4.4.
I consider this to be a bug but if there is something that I'm
misunderstanding about the operation of strands it would be great if
you could help me clear it up.
I've implemented a work around which could only be described as a hack
and would be embarrassed to show it to anybody. But it gets me over my
hump :).
Thanks!
I would like to refer you to this boost::asio bug report:
https://svn.boost.org/trac/boost/ticket/9203
I won't paste the full contents of the bug report into this message.
The executive summary is that the allocation algorithm for the
implementation of asio::strand can and does allocate the
implementation of an existing strand to strands that are subsequently
allocated.
This can have the effect that handlers wrapped in strand (b) will
actually be executed on strand (a). If these handlers are related in
some way (for example with mutexes) and need to not be executed on the
same strand to avoid deadlocks then there is trouble!
Note that this is a change in behaviour from earlier versions of asio.
The behaviour changed with version 1.4.4.
I consider this to be a bug but if there is something that I'm
misunderstanding about the operation of strands it would be great if
you could help me clear it up.
I've implemented a work around which could only be described as a hack
and would be embarrassed to show it to anybody. But it gets me over my
hump :).
Thanks!
--
Greg
Greg