Skip to content

Commit

Permalink
fix typo error in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ptbxzrt authored and microcai committed Jan 16, 2025
1 parent 5294949 commit 070b581
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ int main()
```cpp
int main()
{
start_coro(do_calc());
coro_start(do_calc());
return 0;
}
```
Expand Down Expand Up @@ -207,7 +207,7 @@ awaitable<void> some_work_on_qsocket()

并且使用的时候,要将你用到的 asio 的 io_context 的指针 ( boost::asio::io_context\* )设置为 协程本地存储
```c++
start_coro( your_coroutine(), boost::asio::any_io_executor(io_context.get_executor()) );
coro_start( your_coroutine(), boost::asio::any_io_executor(io_context.get_executor()) );
```
这样启动的协程,里面就可以 co_await 一个 asio::awaitable<> 对象了。比如
Expand Down

0 comments on commit 070b581

Please sign in to comment.