executorlib.task_scheduler.file.shared.FutureItem

executorlib.task_scheduler.file.shared.FutureItem#

class executorlib.task_scheduler.file.shared.FutureItem(file_name: str, selector: int | str | None = None)[source]#

Bases: object

__init__(file_name: str, selector: int | str | None = None)[source]#

Initialize a FutureItem object.

Parameters:
  • file_name (str) – The name of the file.

  • selector (int | str, optional) – The selector to select a specific part of the result. Defaults to None.

Methods

__init__(file_name[, selector])

Initialize a FutureItem object.

done()

Check if the future item is done.

result()

Get the result of the future item.

done() bool[source]#

Check if the future item is done.

Returns:

True if the future item is done, False otherwise.

Return type:

bool

result() Any[source]#

Get the result of the future item.

Returns:

The result of the future item.

Return type:

str