diff --git a/experiment.py b/experiment.py index 3c5d841..674c648 100644 --- a/experiment.py +++ b/experiment.py @@ -1,18 +1,19 @@ import giambio + loop = giambio.EventLoop() """ -What works and what does not (21st March 2020 11:22 AM) +What works and what does not (23rd March 2020 22:38 PM) - Run tasks concurrently: V - Join mechanism: V - Sleep mechanism: V -- Cancellation mechanism: V +- Cancellation mechanism: X Note: Figure out how to rescheule parent task - Exception propagation: V - Concurrent I/O: X Note: I/O would work only when a task is joined (weird) - Return values of coroutines: V -- Scheduling tasks for future execution: X +- Scheduling tasks for future execution: V """ diff --git a/giambio/core.py b/giambio/core.py index c29b2f8..69014aa 100644 --- a/giambio/core.py +++ b/giambio/core.py @@ -52,6 +52,7 @@ class EventLoop: self.running.result = Result(e.args[0] if e.args else None, None) # Saves the return value self.to_run.extend(self.joined.pop(self.running, ())) # Reschedules the parent task except RuntimeError: + self.to_run.extend(self.joined.pop(self.running, ())) self.to_run.append(self.running) except Exception as has_raised: self.to_run.extend(self.joined.pop(self.running, ())) # Reschedules the parent task