boostorg / boostorg/thread

synchronized_value documentation example fails to compile

Open
#374 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
214
Forks
171
PR merge metrics
No merged PRs in 30d

Description

The [documentation](https://github.com/boostorg/thread/blob/develop/doc/synchronized_value.qbk) gives the following example. u1 and u2 appear to be variable names, yet they appear to be undeclared.

```
synchronized_value > q1,q2;
void transferMessage()
{
auto lks = synchronize(u1,u2); // dead-lock free algorithm

if(!std::get<1>(lks)->empty())
{
std::get<2>(lks)->push_back(u1->front());
std::get<1>(lks)->pop_front();
}
}

```

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.