We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
this works for trio curio and asyncio already. All twisted needs to do is implement set_asyncgen_hooks
def sniffio(_get_asyncgen_hooks=sys._get_asyncgen_hooks): hooks = _get_asyncgen_hooks() finalizer = hooks.finalizer if finalizer is not None: return finalizer.__module__.partition(".")[0] firstiter = hooks.firstiter if firstiter is not None: return firstiter.__module__.partition(".")[0]
trio-asyncio can twiddle with hooks.finalizer.__module__ to go back and forth between asyncio and trio
hooks.finalizer.__module__
The text was updated successfully, but these errors were encountered:
oremanj
No branches or pull requests
this works for trio curio and asyncio already. All twisted needs to do is implement set_asyncgen_hooks
trio-asyncio can twiddle with
hooks.finalizer.__module__
to go back and forth between asyncio and trioThe text was updated successfully, but these errors were encountered: