Skip to content

Commit

Permalink
Close the channel in usage
Browse files Browse the repository at this point in the history
  • Loading branch information
dadrian committed Aug 22, 2016
1 parent cb2e139 commit c87bebb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ for (const auto& obj : input_data) {
to_write.send(std::move(s));
}

// Close the channel when completed, and join to the output thread until the
// channel is drained.
to_write.close();
output_thread.join();
```
Expand Down

0 comments on commit c87bebb

Please sign in to comment.