-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shutdown the status thread as soon as clients complete (Issue #316) #359
Conversation
@allanbank as i suggest tabs must be 2 spaces: https://github.com/brianfrankcooper/YCSB/blob/master/checkstyle.xml#L161 |
alldone = _completeLatch.await(deadline-now, TimeUnit.NANOSECONDS); | ||
} | ||
catch( InterruptedException ie) { | ||
// Handled by while loop. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we get interrupted, we ought to return false instead of continuing to wait. (Presuming that will cause us to exit soon)
Should also set the thread's interrupted status.
Good catch @bigbes! One other small nit, please update the commit messages to start with what they impact, in this case "[client]". |
65a6a3b
to
e20bcbd
Compare
I amended the commits. |
client (worker) thread completing via a CountDownLatch. Fixes brianfrankcooper#316
I merged in pr-#286's patch since the two pr's conflict. |
can you amend the last commit to keep my authorship? So long as it's the HEAD commit the command loolks like
It'll open the commit message in your editor, just save and quit. You'll still show up as the committer when thing are in the repo. You'll have to force push the branch to update. |
closes brianfrankcooper#239. Origin patch in PR-286.
done
|
👍 |
Shutdown the status thread as soon as clients complete (Issue #316)
Shutdown the status thread as soon as clients complete (Issue brianfrankcooper#316)
Shutdown the status thread as soon as clients complete (Issue brianfrankcooper#316)
There are two commits.
The first has the actual fix which uses a CountDownLatch to notify the StatusThread when all of the clients have completed.
The second removes whitespace at the ends of lines and replaces tabs with 4 spaces.