ctongfei / progressbar

Terminal-based progress bar for Java / JVM
http://tongfei.me/progressbar/
MIT License
1.07k stars 102 forks source link

How to prevent the delayed printing of 100% line? #133

Open michael-newsrx opened 2 years ago

michael-newsrx commented 2 years ago

I have an issue where the progress bar final 100% prints after the progress bar close has been called and other print statements have executed. There is also a doubled up effect where a 99% line is followed up by a 100% line.

 100% │████████████████████████████████████████████████████████████████████████████│ 31443/31443 (0:00:33 / 0:00:00) 2021-06-21
  99% │███████████████████████████████████████████████████████████████████████████▋│ 15924/16002 (0:00:16 / 0:00:00) 2021-06-28
 100% │████████████████████████████████████████████████████████████████████████████│ 16002/16002 (0:00:16 / 0:00:00) 2021-06-28
  99% │███████████████████████████████████████████████████████████████████████████▋│ 11593/11644 (0:00:11 / 0:00:00) 2021-07-05
 100% │████████████████████████████████████████████████████████████████████████████│ 11644/11644 (0:00:11 / 0:00:00) 2021-07-05
  99% │███████████████████████████████████████████████████████████████████████████▊│ 18752/18791 (0:00:19 / 0:00:00) 2021-07-12
  99% │███████████████████████████████████████████████████████████████████████████▉│ 67906/67948 (0:01:10 / 0:00:00) 2022-04-11
 100% │████████████████████████████████████████████████████████████████████████████│ 67948/67948 (0:01:10 / 0:00:00) 2022-04-11
  99% │███████████████████████████████████████████████████████████████████████████▊│ 23070/23130 (0:00:23 / 0:00:00) 2022-04-18
 100% │████████████████████████████████████████████████████████████████████████████│ 23130/23130 (0:00:23 / 0:00:00) 2022-04-18
  99% │███████████████████████████████████████████████████████████████████████████▉│ 34726/34778 (0:00:35 / 0:00:00) 2022-04-25
 100% │████████████████████████████████████████████████████████████████████████████│ 34778/34778 (0:00:35 / 0:00:00) 2022-04-25
  99% │███████████████████████████████████████████████████████████████████████████▋│ 14287/14350 (0:00:14 / 0:00:00) 2022-05-02

--- Total records exported: 1,709,374.
 100% │████████████████████████████████████████████████████████████████████████████│ 14350/14350 (0:00:14 / 0:00:00) 2022-05-02

Total elapsed: 00:30:21.193
ctongfei commented 2 years ago

What terminal environment are you using?

michael-newsrx commented 1 year ago

Linux MATE-Terminal (xterm-256color)

On 5/5/22 20:55, Tongfei Chen wrote:

What terminal environment are you using?

— Reply to this email directly, view it on GitHub https://github.com/ctongfei/progressbar/issues/133#issuecomment-1119171236, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHY72PV4XV6V45IREXEVBLVIRUXPANCNFSM5UQBGYFQ. You are receiving this because you authored the thread.Message ID: @.***>