From f7fadabc5e64c324e089733c37df887cac9f5c5e Mon Sep 17 00:00:00 2001 From: nocturn9x Date: Fri, 20 Mar 2020 10:26:42 +0100 Subject: [PATCH] Added 2 more attributed to the Task object --- giambio/core.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/giambio/core.py b/giambio/core.py index 8c533a2..2e369bf 100644 --- a/giambio/core.py +++ b/giambio/core.py @@ -5,7 +5,7 @@ from selectors import DefaultSelector, EVENT_READ, EVENT_WRITE from inspect import iscoroutine from functools import wraps import socket -from .exceptions import GiambioError +from .exceptions import GiambioError, AlreadyJoinedError import traceback return_values = {} # Saves the return values from coroutines @@ -29,6 +29,8 @@ class Task: self.coroutine = coroutine self.status = False # Not ran yet self.joined = False + self.ret_val = None # Return value is saved here + self.exception = None # If errored, the exception is saved here def run(self): self.status = True @@ -37,6 +39,7 @@ class Task: def __repr__(self): return f"