Skip to content

Commit

Permalink
hot bug fixed;
Browse files Browse the repository at this point in the history
  • Loading branch information
padu committed Jul 21, 2022
1 parent 7c439df commit 34431d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
16 changes: 1 addition & 15 deletions parallelbar/parallelbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
from concurrent.futures import TimeoutError

from tqdm.auto import tqdm
from tools import get_len
import time
from .tools import get_len


class ProgressBar(tqdm):
Expand Down Expand Up @@ -173,16 +172,3 @@ def progress_imapu(func, tasks, n_cpu=None, chunk_size=None, core_progress=False
disable)
return result


def foo(n):
if n == 50:
1 / 0
elif n == 10:
time.sleep(2)
else:
time.sleep(.5)
return n


if __name__ == '__main__':
res = progress_map(foo, range(20), process_timeout=15)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name='parallelbar',
version='0.2.5',
version='0.2.6',
packages=find_packages(),
author='Dubovik Pavel',
author_email='geometryk@gmail.com',
Expand Down

0 comments on commit 34431d3

Please sign in to comment.