首页 > 编程语言 > 详细

python模块之sniffio

时间:2019-01-03 21:16:59      阅读:169      评论:0      收藏:0      [点我收藏+]

嗅探python用了哪个异步库

from sniffio import current_async_library
import trio
import asyncio

async def print_library():
    library = current_async_library()
    print("This is:", library)

# Prints "This is trio"
trio.run(print_library)

# Prints "This is asyncio"
asyncio.run(print_library())

python模块之sniffio

原文:https://www.cnblogs.com/c-x-a/p/10216859.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!