parsl.app.futures.DataFuture

class parsl.app.futures.DataFuture(fut, 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.

Args:
  • fut (AppFuture) : AppFuture that this DataFuture will track
  • file_obj (string/File obj) : Something representing file(s)
Kwargs:
  • parent ()
  • tid (task_id) : Task id that this DataFuture tracks

Methods

__init__(fut, file_obj[, parent, tid]) Construct the DataFuture object.
add_done_callback(fn)
cancel() Cancel the task that this DataFuture is tracking.
cancelled()
done()
exception([timeout])
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()
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.

Attributes

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.