Method advanced_connection::advanced_connection_impl::block contains race: two different thread can in the same moment block when m_blocker still doesn't exist, so two blockers can be created and there will be data race for m_blocker assignment. Even if assignment will not cause problems itself, incorrect blocker will be returned to one of the caller threads.
Added spinlock mutex to protect the blocker. There is also potential race in shared_connection_block::block(), but I don't think using single shared_connection_block from multiple threads is a valid use case.
advanced_connection::advanced_connection_impl::block
contains race: two different thread can in the same moment block when m_blocker still doesn't exist, so two blockers can be created and there will be data race form_blocker
assignment. Even if assignment will not cause problems itself, incorrect blocker will be returned to one of the caller threads.