Skip to content

Commit

Permalink
performance: explicit sleep in Mpp::get_frame
Browse files Browse the repository at this point in the history
Move msleep() to non MPP_POLL_BLOCK (cv wait) branch.
Issue #6
  • Loading branch information
mcerveny committed Mar 29, 2017
1 parent b8dc440 commit f16ec91
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mpp/mpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,10 @@ MPP_RET Mpp::get_frame(MppFrame *frame)
}
} else
mFrames->wait();
} else {
/* NOTE: this sleep is to avoid user's dead loop */
msleep(1);
}
/* NOTE: this sleep is to avoid user's dead loop */
msleep(1);
}

if (mFrames->list_size()) {
Expand Down

0 comments on commit f16ec91

Please sign in to comment.