boostorg / boostorg/fiber

Asio integration: link error in yield.hpp included in different cpp

Open
#263 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
510
Forks
123
PR merge metrics
No merged PRs in 30d

Description

In the file `examples/asio/yield.hpp` there is the line
```
thread_local yield_t yield{};
```
So if this yield.hpp included in two different cpp files then there will be link issue.

If existing code will be changed with following then issue is solved.
```
inline yield_t& this_yield() {
thread_local yield_t yield;
return yield;
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.