Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CppServer::Asio::Timer is not thread-safe #50

Open
herolover opened this issue Feb 18, 2021 · 0 comments
Open

CppServer::Asio::Timer is not thread-safe #50

herolover opened this issue Feb 18, 2021 · 0 comments

Comments

@herolover
Copy link

CppServer::Asio::Timer::Cancel method must be called from its io_context, otherwise there is a data race.

https://www.boost.org/doc/libs/1_75_0/doc/html/boost_asio/reference/system_timer.html#boost_asio.reference.system_timer.thread_safety

Or mark CppServer::Asio::Timer as not thread-safe.

P.S. I highly recommend to test all of your libs with thread sanitizer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant