summaryrefslogtreecommitdiffstatshomepage
path: root/extmod/uasyncio/task.py
diff options
context:
space:
mode:
Diffstat (limited to 'extmod/uasyncio/task.py')
-rw-r--r--extmod/uasyncio/task.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/extmod/uasyncio/task.py b/extmod/uasyncio/task.py
index 2420ab7193..68ddf496f0 100644
--- a/extmod/uasyncio/task.py
+++ b/extmod/uasyncio/task.py
@@ -148,6 +148,9 @@ class Task:
# Set calling task's data to this task that it waits on, to double-link it.
core.cur_task.data = self
+ def done(self):
+ return self.coro is self
+
def cancel(self):
# Check if task is already finished.
if self.coro is self: