ID EN
Concurrent Futures

add_done_callback

Python 3.11

Attaches the callable fn to the future. fn will be called, with the future as its only argument, when the future is cancelled or finishes running.

Syntax

PYTHON
add_done_callback(fn)

See Also

Exception BaseException