[Python] How can I periodically execute a function with asyncio?

Discussão em 'Python' iniciado por Stack, Abril 4, 2025.

  1. Stack

    Stack Membro Participativo

    I'm migrating from tornado to asyncio, and I can't find the asyncio equivalent of tornado's PeriodicCallback. (A PeriodicCallback takes two arguments: the function to run and the number of milliseconds between calls.)

    • Is there such an equivalent in asyncio?
    • If not, what would be the cleanest way to implement this without running the risk of getting a RecursionError after a while?

    Continue reading...

Compartilhe esta Página