U vâ’iž ã @ sŒ d dl mZmZmZmZ d dlmZmZ d dlmZ d dl mZ d dlm Z edƒZdedef eej edee f d œd d„ZdgZdS ) é )ÚAnyÚCallableÚOptionalÚTypeVar)Ú ObservableÚabc)Ú operators)ÚTimeoutScheduler)ÚAsyncSubjectÚ_TN.)ÚfuncÚ schedulerÚreturnc s* |p t ¡ ‰ ttt dœ‡ ‡fdd„}|S )a² Converts the function into an asynchronous function. Each invocation of the resulting asynchronous function causes an invocation of the original synchronous function on the specified scheduler. Examples: res = reactivex.to_async(lambda x, y: x + y)(4, 3) res = reactivex.to_async(lambda x, y: x + y, Scheduler.timeout)(4, 3) res = reactivex.to_async(lambda x: log.debug(x), Scheduler.timeout)('hello') Args: func: Function to convert to an asynchronous function. scheduler: [Optional] Scheduler to run the function on. If not specified, defaults to Scheduler.timeout. Returns: Aynchronous function. )Úargsr c s<