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

Progress inaccurately reported #95

Open
dmumladze opened this issue Feb 22, 2021 · 9 comments
Open

Progress inaccurately reported #95

dmumladze opened this issue Feb 22, 2021 · 9 comments

Comments

@dmumladze
Copy link

Great little library, but I cannot seem to make it work in multi threaded environment, when threads are trying to increase the progress. I use sync block, but the program finishes and overall progress isn't increased. However, when used in a long running process, everything is working as expected.

@ctongfei
Copy link
Owner

Thanks @dmumladze !
It should work properly with multiple threads. Can you paste some code snippet to show how you used it?

@dmumladze
Copy link
Author

@ctongfei thanks for replying on this.

I'm using it in this project below. The class file with line number, where it's calling progress.stepBy(n) is below as well.

https://github.com/dmumladze/cryptutil

https://github.com/dmumladze/cryptutil/blob/main/src/main/java/com/citigroup/icg/cmc/ConsoleProgressReporter.java#L13

@ctongfei
Copy link
Owner

What do you mean by " but the program finishes and overall progress isn't increased"? When the program finishes, at what location is the progress bar?

@dmumladze
Copy link
Author

It finishes at random percentage but not 100%.

@StealthyDev
Copy link

I face the same problem

@ctongfei
Copy link
Owner

@dmumladze Seems to be a synchronization problem among threads. Have you tried labeling the methods as synchronized in your ProgressReporter?

@dmumladze
Copy link
Author

@ctongfei I’m using 0.7.4 version now and that has no such issue.

@ctongfei
Copy link
Owner

@dmumladze Thanks. This would be a regression. I'll investigate

@ctongfei
Copy link
Owner

@dmumladze Can you verify if 0.8.1 works?

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

No branches or pull requests

3 participants