def threadsafe_call(self, fn, *args, **kwargs):
def handler():<EOL><INDENT>try:<EOL><INDENT>fn(*args, **kwargs)<EOL><DEDENT>except Exception:<EOL><INDENT>warn("<STR_LIT>",<EOL>format_exc())<EOL><DEDENT><DEDENT>def greenlet_wrapper():<EOL><INDENT>gr = greenlet.greenlet(handler)<EOL>gr.switch()<EOL><DEDENT>self._async_session.threadsafe_call(greenlet_wrapper)<EOL>
Wrapper around `AsyncSession.threadsafe_call`.