Mykhail Martsyniuk
09/15/2025, 9:09 AMNate
09/15/2025, 2:57 PMloop.run_in_executor(None, lambda: your_function(*args, **kwargs))
I see the comment above
Async Prefect task wrapper around run_singer_tap.
Executes the synchronous run_singer_tap in a thread to avoid blocking the event loop.
but I'm asking because if you have a normal task
@task
def foo(): ...
you can use built-in task functionality to send it to a thread pool via submit
like
foo() # runs in the main thread
foo.submit().result() # runs in a worker thread
Mykhail Martsyniuk
09/15/2025, 3:03 PMMykhail Martsyniuk
09/15/2025, 3:09 PM