ledger/utils.py
def asyncify(function: Callable, *args: Any, **kwargs: Any) -> Awaitable:
    '''
    Turns a synchronous function into a future
    '''
    loop = asyncio.get_event_loop()
    p = partial(function, *args, **kwargs)
    return loop.run_in_executor(None, p)

    Turns a synchronous function into a future
    
Turns a synchronous function into a future
Turns a synchronous function into a future
def asyncify(function: Callable, *args: Any, **kwargs: Any) -> Awaitable:
    loop = asyncio.get_event_loop()
    p = partial(function, *args, **kwargs)
    return loop.run_in_executor(None, p)
def asyncify ( function : Callable , * args : Any , ** kwargs : Any ) -> Awaitable : loop = asyncio . get_event_loop ( ) p = partial ( function , * args , ** kwargs ) return loop . run_in_executor ( None , p )
Turns a synchronous function into a future
Turns a synchronous function into a future
'''
    Turns a synchronous function into a future
    '''
function
Callable
args
Any
kwargs
Any