async_base::complete dispatches handler without using the operation's associated executor
Open
Bug
- Dominant language
- C++
- Stars
- 4.8k
- Forks
- 694
- Avg merge
- 12h 48m
- Merged PRs (30d)
- 1
Description
Currently, `async_base::complete` passes the handler to `dispatch`, which may not have an associated executor. However, the operation itself (`async_base`) is tied to the stream's default executor. This can lead to the handler being executed on an unexpected or incorrect execution context:
https://github.com/boostorg/beast/blob/63f3d3f3930288726b5862f24728ed9d418d080a/include/boost/beast/core/async_base.hpp#L421-L425
Contributor guide
Assessment
This issue has not been assessed yet.