pb
pb copied to clipboard
possibility to update ProgressBar from worker pool
Dear Sergey, using your Progress Bar V1 module in few my utilities. So far all is working as expected, many thanks.
Due to amount of tasks need to implement Worker Pool inspired from this Post
Struggling to update the Progress bar from go-routines.
any Idea?
Thanks
For reference: It's better to allow such things to update asynchronously-yet-linearly: Have the workers send to a channel, and then a single routine updating the bar. Here's a trivial playground to demo: https://go.dev/play/p/oXMK5nFUDuW
It's absolutely safe to update progressBar from different goroutines.