Skip to content

Commit

Permalink
3.6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
SirDank committed Jan 17, 2025
1 parent 1c71872 commit b9e4fa8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions dankware/multithread.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,21 @@ def multithread(function: callable, threads: int = 1, *args, progress_bar: bool
time.sleep(0.1)
for future in as_completed(futures):
if future.done():
try: future.result()
except: pass
try:
future.result()
except Exception as e:
raise RuntimeError("An error occurred while processing the future result") from e
job_progress.advance(overall_task)

else:
for future in as_completed(futures):
if future.done():
try: future.result()
except: pass
try:
future.result()
except Exception as e:
raise RuntimeError("An error occurred while processing the future result") from e

except:
try: executor.shutdown()
try: executor.shutdown(wait=False, cancel_futures=True)
except: pass
sys.exit(clr(err(sys.exc_info()),2))
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

license = "MIT",
name = "dankware",
version = "3.6.4",
version = "3.6.5",
author = "SirDank",

author_email = "[email protected]",
Expand Down

0 comments on commit b9e4fa8

Please sign in to comment.