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"