
15 May
2012
15 May
'12
3:12 p.m.
I see what you are saying. let's say DispatchSend is called between StartSend and HandleSend. However, we do push_back a new element to the list in DispatchSend(). Adding a new element is still a problem?
It depends on the type of m_pending_sends - if it's std::vector, its iterators are invalidated on push_back.
you think i should mutex these push_back and erase operations? I though io_strand handles all these issues.
strand only guaratees that handlers won't be invoked concurrently: http://www.boost.org/doc/libs/1_49_0/doc/html/boost_asio/reference/io_servic...