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

possibility to update ProgressBar from worker pool #195

Open
beva-sdev opened this issue Jan 10, 2023 · 3 comments
Open

possibility to update ProgressBar from worker pool #195

beva-sdev opened this issue Jan 10, 2023 · 3 comments

Comments

@beva-sdev
Copy link

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

@beva-sdev
Copy link
Author

Found possible solution thanks "gomparator".

Thanks

@cognusion
Copy link

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

@cheggaaa
Copy link
Owner

cheggaaa commented Feb 1, 2023

It's absolutely safe to update progressBar from different goroutines.

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

No branches or pull requests

3 participants