摘要: 1、参考来源 https://github.com/MagicStack/uvloop 2、环境要求 不支持Windows系统 3、安装模块 pip3 install uvloop pip3 install -U pip 4、引用的示例 1 import asyncio 2 import sys 3 阅读全文
posted @ 2022-09-24 17:22 小粉优化大师 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 1、参考来源 https://docs.python.org/zh-cn/3.9/reference/datamodel.html?highlight=aiter#asynchronous-context-managers 2、代码示例 1 # -*- coding: utf-8 -*- 2 """ 阅读全文
posted @ 2022-09-24 17:10 小粉优化大师 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 1、参考来源 https://docs.python.org/zh-cn/3.9/reference/datamodel.html?highlight=aiter#asynchronous-iterators 2、代码示例: 1 # -*- coding: utf-8 -*- 2 """ 3 Fil 阅读全文
posted @ 2022-09-24 17:01 小粉优化大师 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 1、使用前提 将不支持异常的模板与asyncio结合使用【默认是使用线程池+事件循环】 2、同时下载3张图片的示例 1 # -*- coding: utf-8 -*- 2 """ 3 File Name : test 4 Description : 5 Author : Administrator 阅读全文
posted @ 2022-09-24 16:46 小粉优化大师 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 1、来源参考 参考官方文档示例 :https://docs.python.org/3.9/library/asyncio-eventloop.html#asyncio.loop.run_in_executor 2、代码示例 1 # -*- coding: utf-8 -*- 2 """ 3 File 阅读全文
posted @ 2022-09-24 15:57 小粉优化大师 阅读(427) 评论(0) 推荐(0) 编辑