Commit fae83a6b authored by Jim Mussared's avatar Jim Mussared Committed by Damien George

tests/extmod/asyncio_threadsafeflag.py: Update for unix select.

1. Remove the skip for detecting support for polling user-defined objects
   as this is always possible now on all ports.
2. Don't print when the scheduled task runs as the ordering of this
   relative to the other prints is dependent on other factors (e.g. if
   using the native emitter).

This work was funded through GitHub Sponsors.
Signed-off-by: default avatarJim Mussared <jim.mussared@gmail.com>
parent cfe6a11e
...@@ -16,17 +16,6 @@ except AttributeError: ...@@ -16,17 +16,6 @@ except AttributeError:
raise SystemExit raise SystemExit
try:
# Unix port can't select/poll on user-defined types.
import select
poller = select.poll()
poller.register(asyncio.ThreadSafeFlag())
except TypeError:
print("SKIP")
raise SystemExit
async def task(id, flag): async def task(id, flag):
print("task", id) print("task", id)
await flag.wait() await flag.wait()
...@@ -34,9 +23,7 @@ async def task(id, flag): ...@@ -34,9 +23,7 @@ async def task(id, flag):
def set_from_schedule(flag): def set_from_schedule(flag):
print("schedule")
flag.set() flag.set()
print("schedule done")
async def main(): async def main():
......
...@@ -9,8 +9,6 @@ yield ...@@ -9,8 +9,6 @@ yield
task 2 task 2
set event set event
yield yield
schedule
schedule done
wait task wait task
task 2 done task 2 done
---- ----
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment