reflex/reflex/experimental/misc.py
2024-04-11 16:42:14 -07:00

13 lines
281 B
Python

"""Miscellaneous functions for the experimental package."""
import asyncio
async def run_in_thread(func):
"""Run a function in a separate thread.
Args:
func (callable): The function to run.
"""
await asyncio.get_event_loop().run_in_executor(None, func)