Closed jepler closed 2 years ago
Sadly this does not appear to fix https://github.com/adafruit/circuitpython/issues/6706.
@dhalbert I think this is ready, though I could rebase it to get rid of the 'bare yield' iteration of the change.
@dhalbert ready for your re-review
This set of changes, together with some other changes in the core and in adafruit_circuitpython_ticks, allow all the asyncio-related core tests to pass at build time (that is, with the ports/unix build).
Probably a good place to discuss this is
Micropython can use a non-standard construct of
yield
in anasync def
to cause the async function to be suspended indefinitely, until some other task causes it to be scheduled again.await sleep(0)
is equivalent, so an internal "_Never" class is introduced which can do this in a way that is syntactically valid in standard Python as well.When using the core implementation of Task & TaskGroup, there are Problems, so this PR disables that. Doing so might also fix the following issues in the core repo, but I didn't specifically test them:This Closes https://github.com/adafruit/circuitpython/issues/6954 but https://github.com/adafruit/circuitpython/issues/6706 is not fixed (a different core change will fix that one)