Describes the behavior of add_done_callback when the callable raises.
This commit is contained in:
parent
c7a8f5a164
commit
cfc8ae9456
10
pep-3148.txt
10
pep-3148.txt
|
@ -228,9 +228,13 @@ callable. `Future` instances are returned by `Executor.submit`.
|
|||
|
||||
Attaches a callable *fn* to the future that will be called when
|
||||
the future is cancelled or finishes running. *fn* will be called
|
||||
with the future as its only argument. Added callables are called
|
||||
in the order that they were added and are always called in a
|
||||
thread belonging to the process that added them.
|
||||
with the future as its only argument.
|
||||
|
||||
Added callables are called in the order that they were added and
|
||||
are always called in a thread belonging to the process that added
|
||||
them. If the callable raises an `Exception` then it will be
|
||||
logged and ignored. If the callable raises another
|
||||
`BaseException` then behavior is not defined.
|
||||
|
||||
If the future has already completed or been cancelled then *fn*
|
||||
will be called immediately.
|
||||
|
|
Loading…
Reference in New Issue