Miksus / rocketry

Modern scheduling library for Python
https://rocketry.readthedocs.io
MIT License
3.28k stars 108 forks source link

Is there any way to schedule an async function using 'threads' or 'processes'? #222

Open lkyhfx opened 1 year ago

lkyhfx commented 1 year ago

Currently, I have some async functions that I want to schedule, but the only viable execution seems to be async. Although these async functions are using async API, they also include CPU-intensive code, and using a separate thread or process should provide better concurrency.

There are several ways to run an async function in a new thread, such as those described in these links: Link 1, Link 2, and Link 3. None of them seem to work with the rockertry decorator.