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

compatibility with parallel gem #196

Closed
2 of 12 tasks
dorianmariecom opened this issue Sep 1, 2024 · 2 comments
Closed
2 of 12 tasks

compatibility with parallel gem #196

dorianmariecom opened this issue Sep 1, 2024 · 2 comments

Comments

@dorianmariecom
Copy link

Current Behavior

the progress bar acts randomly, doesn't finish, doesn't increment correctly

Steps to Reproduce

require 'parallel'; require 'ruby-progressbar'; progress_bar = ProgressBar.create; Parallel.each(1..100) { |i| sleep(rand(2)); progress_bar.increment }

Screenshot

Screen.Recording.2024-09-01.at.13.30.05.mov

Expected Behavior

progress bar acts normal, increments, etc.

Environment

Screenshot 2024-09-01 at 13 32 21

  • Device: Macbook Air

  • OS:

    • Windows
    • macOS
    • iOS
    • Android
    • Linux
    • Other
  • OS Version: macos 14.6.1

  • Browser:

    • Chrome
    • Safari
    • Firefox
    • Internet Explorer
    • Edge
    • Opera
  • Browser Version: 128.0.6613.84 (Official Build) (arm64)

@dorianmariecom
Copy link
Author

works with threads, not with processes

@jfelchner
Copy link
Owner

Yeah a process is a completely different process so you'd need a progressbar instance defined for each process. However even then, you can only show one progressbar on the screen at a time. I think what you're wanting is to have one progressbar that is able to be incremented in each process and that's not possible.

Please let me know if I'm misunderstanding what you're doing but I'm going to close this

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

2 participants