|
rosros 0.2.5
Simple unified interface to ROS1 / ROS2 Python API
|
Executes a function or coroutine. More...

Public Member Functions | |
| __init__ (self, handler, args=None, kwargs=None, executor=None) | |
| __call__ (self) | |
| Run or resume a task. | |
| executing (self) | |
| Check if the task is currently being executed. | |
Public Member Functions inherited from rosros.rclify.task.Future | |
| __init__ (self, *executor=None) | |
| __del__ (self) | |
| __await__ (self) | |
| Yield while the task is not finished. | |
| add_done_callback (self, callback) | |
| Add a callback to be executed when the task is done. | |
| cancel (self) | |
| Request cancellation of the running task if it is not done already. | |
| cancelled (self) | |
| Indicate if the task has been cancelled. | |
| done (self) | |
| Indicate if the task has finished executing. | |
| exception (self) | |
| Get an exception raised by a done task. | |
| result (self) | |
| Get the result of a done task. | |
| set_exception (self, exception) | |
| Set the exception raised by the task. | |
| set_result (self, result) | |
| Set the result returned by a task. | |
Protected Member Functions | |
| _complete_task (self) | |
| Cleanup after task finished. | |
Protected Member Functions inherited from rosros.rclify.task.Future | |
| _invoke_done_callbacks (self) | |
| Schedule done callbacks on the executor if possible, else run them directly. | |
Protected Attributes | |
| _args | |
| _executing | |
| _handler | |
| _kwargs | |
| _task_lock | |
Protected Attributes inherited from rosros.rclify.task.Future | |
| _callbacks | |
| _cancelled | |
| _done | |
| _exception | |
| _exception_fetched | |
| _lock | |
| _result | |
Executes a function or coroutine.
This executes either a normal function or a coroutine to completion. On completion it creates tasks for any 'done' callbacks.
| rosros.rclify.task.Task.__init__ | ( | self, | |
| executor, | |||
args = None, |
|||
kwargs = None, |
|||
executor = None |
|||
| ) |
| executor | ignored (ROS2 API compatibility stand-in) |
Reimplemented from rosros.rclify.task.Future.
| rosros.rclify.task.Task.__call__ | ( | self | ) |
|
protected |
| rosros.rclify.task.Task.executing | ( | self | ) |