def add_done_callback(self, function, *args, **kwargs):
with self._done_callbacks_lock:<EOL><INDENT>self._done_callbacks.append(<EOL>FunctionContainer(function, *args, **kwargs)<EOL>)<EOL><DEDENT>
Add a done callback to be invoked when transfer is done