79421425

Date: 2025-02-07 15:44:42
Score: 1.5
Natty:
Report link

According to https://github.com/tqdm/tqdm?tab=readme-ov-file#nested-progress-bars and https://github.com/tqdm/tqdm/blob/master/examples/parallel_bars.py,

    with futures.ProcessPoolExecutor(
        max_workers=PROCESSES,
        initializer=tqdm.tqdm.set_lock,
        initargs=(tqdm.tqdm.get_lock(),),
    ) as executor:

to share the same tqdm.tqdm._lock = TqdmDefaultWriteLock() among the processes.

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: tos