projects
/
pyutils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adds a __repr__ to graph.
[pyutils.git]
/
src
/
pyutils
/
parallelize
/
smart_future.py
diff --git
a/src/pyutils/parallelize/smart_future.py
b/src/pyutils/parallelize/smart_future.py
index b722cfecb5d6e4b525bf5770ae1014634fd5d787..6da4db2da1c042030503903f6e9434f1b4e41494 100644
(file)
--- a/
src/pyutils/parallelize/smart_future.py
+++ b/
src/pyutils/parallelize/smart_future.py
@@
-1,6
+1,6
@@
#!/usr/bin/env python3
#!/usr/bin/env python3
-# © Copyright 2021-202
2
, Scott Gasch
+# © Copyright 2021-202
3
, Scott Gasch
"""
A :class:`Future` that can be treated as a substutute for the result
"""
A :class:`Future` that can be treated as a substutute for the result
@@
-79,11
+79,11
@@
def wait_any(
if log_exceptions and not f.cancelled():
exception = f.exception()
if exception is not None:
if log_exceptions and not f.cancelled():
exception = f.exception()
if exception is not None:
- logger.
warning
(
+ logger.
exception
(
"Future 0x%x raised an unhandled exception and exited.",
id(f),
"Future 0x%x raised an unhandled exception and exited.",
id(f),
+ exc_info=exception,
)
)
- logger.exception(exception)
raise exception
yield smart_future_by_real_future[f]
except concurrent.futures.TimeoutError:
raise exception
yield smart_future_by_real_future[f]
except concurrent.futures.TimeoutError:
@@
-125,11
+125,11
@@
def wait_all(
if not f.cancelled():
exception = f.exception()
if exception is not None:
if not f.cancelled():
exception = f.exception()
if exception is not None:
- logger.
warning
(
+ logger.
exception
(
"Future 0x%x raised an unhandled exception and exited.",
id(f),
"Future 0x%x raised an unhandled exception and exited.",
id(f),
+ exc_info=exception,
)
)
- logger.exception(exception)
raise exception
assert len(done) == len(real_futures)
assert len(not_done) == 0
raise exception
assert len(done) == len(real_futures)
assert len(not_done) == 0