Skip to content

Commit

Permalink
Synced chapter05 recipe 7
Browse files Browse the repository at this point in the history
  • Loading branch information
apolukhin committed May 1, 2017
1 parent ac0db32 commit 24f80b8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Chapter05/07_interruptions/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@ void do_parse();
int main() {
boost::thread parser_thread(&do_parse);

// Some code goes here
// ...

if (stop_parsing) {
// no more parsing required
// TODO: stop parser
// No more parsing required.
// TODO: Stop the parser!
}

if (stop_parsing) {
// no more parsing required
// No more parsing required.
parser_thread.interrupt();
}

Expand Down

0 comments on commit 24f80b8

Please sign in to comment.