Asyncio - function type
Posted: Wed Oct 14, 2020 12:24 pm
Hi everyone, I am stumped on this project that uses a task to call driver functions based on commands sent via mqtt.
The part that is a pain is the drivers contain some asynchronous functions and some standard functions. I need the task that calls these functions to be able to identify the Async functions so I can call them with "await" and then just call the others normally.
I can't seem to identify the function in a condition, while it says the Async function is a "generator" I can seem to check this class type in a condition.
Any ideas would be much appreciated.
The part that is a pain is the drivers contain some asynchronous functions and some standard functions. I need the task that calls these functions to be able to identify the Async functions so I can call them with "await" and then just call the others normally.
I can't seem to identify the function in a condition, while it says the Async function is a "generator" I can seem to check this class type in a condition.
Any ideas would be much appreciated.