admin管理员组

文章数量:1315969

In a MicroPython project, on an ESP32 microcontroller, I have two events that I have created like so:

ev1 = asyncio.Event()
ev2 = asyncio.Event()

Now, in a co-routine, I would like to wait until one of the two events has been set. So basically something like this:

async func():
    # some code
    await ev1.wait() # but wait for ev1 OR ev2 to be set

How can I do this?

本文标签: