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

tqdm.write under multiprocessing.Pool make bars overlapped #680

Open
3 tasks done
yihengli opened this issue Feb 22, 2019 · 0 comments
Open
3 tasks done

tqdm.write under multiprocessing.Pool make bars overlapped #680

yihengli opened this issue Feb 22, 2019 · 0 comments
Assignees
Labels
p2-bug-warning ⚠ Visual output bad synchronisation ⇶ Multi-thread/processing

Comments

@yihengli
Copy link

  • I have visited the source website, and in particular
    read the known issues
  • I have searched through the issue tracker for duplicates
  • I have mentioned version numbers, operating system and
    environment, where applicable:
    import tqdm, sys
    print(tqdm.__version__, sys.version, sys.platform)

Env

4.26.0 3.7.2 (default, Dec 29 2018, 00:00:04)
[Clang 4.0.1 (tags/RELEASE_401/final)] darwin . (MacOS . 10.13.4)

Reproduce

from time import sleep
from tqdm import tqdm
from multiprocessing import Pool


def foo(a):
    tqdm.write("Working on %d" % a)
    sleep(0.5)
    return a

if __name__ == '__main__':
    with Pool(2) as p:
        list(tqdm(p.imap(foo, range(20)), total=20))

screen shot 2019-02-21 at 5 43 07 pm

This might be relevant to #407

@casperdcl casperdcl added p2-bug-warning ⚠ Visual output bad synchronisation ⇶ Multi-thread/processing labels Feb 25, 2019
@casperdcl casperdcl self-assigned this Feb 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-bug-warning ⚠ Visual output bad synchronisation ⇶ Multi-thread/processing
Projects
None yet
Development

No branches or pull requests

2 participants