class, file_obj, parent=None, tid=None)[source]

A datafuture points at an AppFuture.

We are simply wrapping a AppFuture, and adding the specific case where, if the future is resolved i.e file exists, then the DataFuture is assumed to be resolved.

__init__(fut, file_obj, parent=None, tid=None)[source]

Construct the DataFuture object.

If the file_obj is a string convert to a File.

  • fut (-) – AppFuture that this DataFuture will track
  • file_obj (-) – Something representing file(s)
  • parent ()
  • tid (task_id) : Task id that this DataFuture tracks


__init__(fut, file_obj[, parent, tid]) Construct the DataFuture object.
add_done_callback(fn) Attaches a callable that will be called when the future finishes.
cancel() Cancel the task that this DataFuture is tracking.
cancelled() Return True if the future was cancelled.
done() Return True of the future was cancelled or finished executing.
exception([timeout]) Return the exception raised by the call that the future represents.
parent_callback(parent_fu) Callback from executor future to update the parent.
result([timeout]) A blocking call that returns either the result or raises an exception.
running() Return True if the future is currently executing.
set_exception(exception) Sets the result of the future as being the given exception.
set_result(result) Sets the return value of work associated with the future.
set_running_or_notify_cancel() Mark the future as running or process any cancel notifications.


filename Filepath of the File object this datafuture represents.
filepath Filepath of the File object this datafuture represents.
tid Returns the task_id of the task that will resolve this DataFuture.