Skip to content

Commit

Permalink
Merge 0f9dbe0 into f54b0e4
Browse files Browse the repository at this point in the history
  • Loading branch information
miloyip committed Aug 29, 2016
2 parents f54b0e4 + 0f9dbe0 commit 586d1ff
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions example/parsebyparts/parsebyparts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,15 @@ class AsyncDocumentParser {
AsyncDocumentParser(Document& d)
: stream_(*this)
, d_(d)
, parseThread_(&AsyncDocumentParser::Parse, this)
, parseThread_()
, mutex_()
, notEmpty_()
, finish_()
, completed_()
{}
{
// Create and execute thread after all member variables are initialized.
parseThread_ = std::thread(&AsyncDocumentParser::Parse, this);
}

~AsyncDocumentParser() {
if (!parseThread_.joinable())
Expand Down

0 comments on commit 586d1ff

Please sign in to comment.