Skip to content
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

Fix Slow Exit #51

Merged
merged 4 commits into from
May 20, 2019
Merged

Fix Slow Exit #51

merged 4 commits into from
May 20, 2019

Conversation

meawoppl
Copy link
Contributor

@meawoppl meawoppl commented May 17, 2019

At present progressbar version 0.7.3 will take on average updateInterval / 2 milliseconds to terminate, and for very short runs, will take a minimum of updateInterval to complete its close() handler.

This patch fixes that by explicitly interrupting the ProgressThread as opposed to waiting for an internal semaphore to cleanup on the inner loop.

@ctongfei
Copy link
Owner

Thanks @meawoppl ! And it fixes #50, right?

@meawoppl
Copy link
Contributor Author

meawoppl commented May 17, 2019

Oh yeah, totally. I didn't even see the issue 👍
Can I help making a new release? This is now a (patched) source-dep in a big project of mine :/

@ctongfei
Copy link
Owner

I'll merge your PR this weekend and release 0.7.4. Thanks!

@meawoppl
Copy link
Contributor Author

(gentle poke)

@ctongfei ctongfei merged commit 61678db into ctongfei:master May 20, 2019
public void run() {
try {
while (!killed) {
while (!Thread.interrupted()) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a refresh() in the catch clause.

@ctongfei
Copy link
Owner

Thanks a lot :-) I've fixed your bug and published 0.7.4.

@meawoppl
Copy link
Contributor Author

meawoppl commented May 20, 2019

Awesome. Thanks. Also apparently you know @HunterJHU :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants