Scheduling Calls

Let's see how you can schedule calls to functions using asyncio module.

We'll cover the following

You can also schedule calls to regular functions using the asyncio event loop. The first method we’ll look at is call_soon. The call_soon method will basically call your callback or event handler as soon as it can. It works as a FIFO queue, so if some of the callbacks take a while to run, then the others will be delayed until the previous ones have finished.

Implementation of call_soon()

Let’s look at an example:

Get hands-on with 1200+ tech skills courses.