5578182ec9
Replace the is_running field with a tri-state variable to indicate running/not-running/pending-exception. Update tests to cover the various cases. This allows cancellation in uasyncio even if the coroutine hasn't been executed yet. Fixes #5242
16 lines
246 B
Plaintext
16 lines
246 B
Plaintext
0
|
|
1
|
|
raised ValueError()
|
|
ret was: None
|
|
raised OSError()
|
|
raised ValueError('generator already executing',)
|
|
raised ValueError('generator already executing',)
|
|
0
|
|
ignore CancelledError
|
|
1
|
|
raised CancelledError()
|
|
None
|
|
CancelledError()
|
|
CancelledError()
|
|
1
|