progressbar
progressbar copied to clipboard
Progress inaccurately reported
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.
Thanks @dmumladze ! It should work properly with multiple threads. Can you paste some code snippet to show how you used it?
@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
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?
It finishes at random percentage but not 100%.
I face the same problem
@dmumladze Seems to be a synchronization problem among threads. Have you tried labeling the methods as synchronized
in your ProgressReporter
?
@ctongfei I’m using 0.7.4 version now and that has no such issue.
@dmumladze Thanks. This would be a regression. I'll investigate
@dmumladze Can you verify if 0.8.1
works?