@@ -265,19 +265,20 @@ are hard to debug. There is code which I believe is for debugging purposes and
265
265
some I have added myself for this purpose. The aim is to ensure that, if an
266
266
error causes a coro to be scheduled when it shouldn't be, an exception is
267
267
thrown. The alternative is weird, hard to diagnose, behaviour.
268
- These are the instances.
269
-
270
- [ pend_throw(false)] ( https://github.com/peterhinch/micropython-lib/blob/f20d89c6aad9443a696561ca2a01f7ef0c8fb302/uasyncio.core/uasyncio/core.py#L119 )
271
- [ also here] ( https://github.com/peterhinch/micropython-lib/blob/f20d89c6aad9443a696561ca2a01f7ef0c8fb302/uasyncio.core/uasyncio/core.py#L123 )
268
+ These are the instances:
269
+ [ pend_throw(false)] ( https://github.com/peterhinch/micropython-lib/blob/f20d89c6aad9443a696561ca2a01f7ef0c8fb302/uasyncio.core/uasyncio/core.py#L119 )
270
+ also [ here] ( https://github.com/peterhinch/micropython-lib/blob/f20d89c6aad9443a696561ca2a01f7ef0c8fb302/uasyncio.core/uasyncio/core.py#L123 ) .
272
271
I think the intention here is to throw an exception (exception doesn't inherit
273
272
from Exception) if it is scheduled incorrectly. Correct scheduling coutermands
274
- this:
275
- [ here] ( https://github.com/peterhinch/micropython-lib/blob/819562312bae807ce0d01aa8ad36a13c22ba9e40/uasyncio/uasyncio/__init__.py#L97 )
276
- [ and here] ( https://github.com/peterhinch/micropython-lib/blob/819562312bae807ce0d01aa8ad36a13c22ba9e40/uasyncio/uasyncio/__init__.py#L114 )
277
- The ` rdobjmap ` and ` wrobjmap ` dictionary entries are invalidated
273
+ this
274
+ [ here] ( https://github.com/peterhinch/micropython-lib/blob/819562312bae807ce0d01aa8ad36a13c22ba9e40/uasyncio/uasyncio/__init__.py#L97 )
275
+ and [ here] ( https://github.com/peterhinch/micropython-lib/blob/819562312bae807ce0d01aa8ad36a13c22ba9e40/uasyncio/uasyncio/__init__.py#L114 ) :
276
+ these lines ensures that the exception will not be thrown.
277
+ The ` rdobjmap ` and ` wrobjmap ` dictionary entries are invalidated
278
278
[ here] ( https://github.com/peterhinch/micropython-lib/blob/819562312bae807ce0d01aa8ad36a13c22ba9e40/uasyncio/uasyncio/__init__.py#L91 )
279
- [ and here] ( https://github.com/peterhinch/micropython-lib/blob/819562312bae807ce0d01aa8ad36a13c22ba9e40/uasyncio/uasyncio/__init__.py#L101 )
279
+ and [ here] ( https://github.com/peterhinch/micropython-lib/blob/819562312bae807ce0d01aa8ad36a13c22ba9e40/uasyncio/uasyncio/__init__.py#L101 ) .
280
280
This has the same aim: if an attempt is made incorrectly to reschedule them, an
281
+ exception is thrown.
281
282
282
283
# Modifying uasyncio
283
284
0 commit comments