Updated TODOs

This commit is contained in:
nocturn9x 2020-03-23 20:42:12 +00:00
parent 8d9b874228
commit 74863525fd
2 changed files with 5 additions and 3 deletions

View File

@ -1,18 +1,19 @@
import giambio import giambio
loop = giambio.EventLoop() 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 - Run tasks concurrently: V
- Join mechanism: V - Join mechanism: V
- Sleep mechanism: V - Sleep mechanism: V
- Cancellation mechanism: V - Cancellation mechanism: X Note: Figure out how to rescheule parent task
- Exception propagation: V - Exception propagation: V
- Concurrent I/O: X Note: I/O would work only when a task is joined (weird) - Concurrent I/O: X Note: I/O would work only when a task is joined (weird)
- Return values of coroutines: V - Return values of coroutines: V
- Scheduling tasks for future execution: X - Scheduling tasks for future execution: V
""" """

View File

@ -52,6 +52,7 @@ class EventLoop:
self.running.result = Result(e.args[0] if e.args else None, None) # Saves the return value 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 self.to_run.extend(self.joined.pop(self.running, ())) # Reschedules the parent task
except RuntimeError: except RuntimeError:
self.to_run.extend(self.joined.pop(self.running, ()))
self.to_run.append(self.running) self.to_run.append(self.running)
except Exception as has_raised: except Exception as has_raised:
self.to_run.extend(self.joined.pop(self.running, ())) # Reschedules the parent task self.to_run.extend(self.joined.pop(self.running, ())) # Reschedules the parent task