� !A?h � �. � d dl Z d dlZddlmZ dZd� ZdS )� N� )�events)� to_threadc � �� K � t j � � }t j � � }t j |j | g|�R i |��}|� d |� � � d {V ��S )N)r �get_running_loop�contextvars�copy_context� functools�partial�run�run_in_executor)�func�args�kwargs�loop�ctx� func_calls �