![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
asyncio
喝可乐_耍酒疯
这个作者很懒,什么都没留下…
展开
-
python3 asyncio库学习(一)—— coroutine, task , future的区别
18.5.3.1. Coroutines¶Coroutines used with asyncio may be implemented using the async def statement, or by using generators. The async def type of coroutine was added in Python 3.5, and is recommended...原创 2019-06-04 16:05:15 · 1249 阅读 · 0 评论 -
python3 asyncio库学习(二)—— corcurrent和asyncio的效率对比
(1) corcurrent线程池(python3)#!/usr/bin/python3import socketimport sysimport ssl#from multiprocessing import Poolimport concurrent.futuresfrom contextlib import closingimport timeimport certifi...原创 2019-06-04 16:13:23 · 369 阅读 · 0 评论 -
python3 asyncio库学习(三)—— 协程的超时处理和取消
import asyncioimport osimport timefrom asyncio.subprocess import PIPE, STDOUTfrom threading import Threadfrom log_helper import *@asyncio.coroutinedef do_task(domain, loop): print(11111111...原创 2019-06-04 16:14:47 · 3273 阅读 · 0 评论