eventor:多线程,进程,协程 任务执行器

时间:2021-05-02 15:47:18
【文件属性】:
文件名称:eventor:多线程,进程,协程 任务执行器
文件大小:9KB
文件格式:ZIP
更新时间:2021-05-02 15:47:18
async python35 gevent muti-process eventor eventor 使用多线程,进程以及协程实现的任务执行器,加快任务执行(针对IO密集型任务) description 1.Eventor类,初始化参数如下: threadcount: 开启多少个线程 taskunitcount: 每个线程处理多少任务 func: 实际的处理任务的函数, 自己实现 interval: 线程间隔 async: 同步异步 2.start_multi_consumer方法, 场景:模拟多个消费者(进程) 消费共享资源, 参数如下: consumercount: 开启的消费者(进程)个数,默认 cput_count() iterable=None: 共享资源 consumer_func=None: 具体的消费行为 beforecallback=None: 每个消费者开启之前调用 aftercallback=None: 每个消费者执行消费行为之后调用(仅当 arsy
【文件预览】:
eventor-master
----setup.py(1014B)
----.gitignore(26B)
----requirements.txt(44B)
----resources()
--------data.txt(20B)
----.travis.yml(402B)
----MANIFEST.in(19B)
----LICENSE(1KB)
----README.md(3KB)
----eventor()
--------processcore.py(2KB)
--------__init__.py(249B)
--------VERSION(5B)
--------util.py(1007B)
--------utilscore.py(526B)
--------core.py(4KB)
----test()
--------__init__.py(176B)
--------test.py(1KB)

网友评论