Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fooying/fthreadpool
线程池模块,增加超时监控,自动Kill
https://github.com/fooying/fthreadpool
Last synced: 21 days ago
JSON representation
线程池模块,增加超时监控,自动Kill
- Host: GitHub
- URL: https://github.com/fooying/fthreadpool
- Owner: fooying
- Created: 2017-08-16T09:56:19.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-16T10:01:13.000Z (over 7 years ago)
- Last Synced: 2024-08-05T17:41:05.827Z (4 months ago)
- Language: Python
- Size: 6.84 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-hacking-lists - fooying/fthreadpool - 线程池模块,增加超时监控,自动Kill (Python)
README
# fthreadpool
线程池模块,增加超时监控,自动Kill
by Fooying 2017/06/16* 基于http://chrisarndt.de/projects/threadpool/ 线程池模块修改
#### 修改功能:
1. 多线程增加可kill方法
2. 增加线程池任务超时监控#### 缺陷:
1. 多线程kill方法采用threading.settrace来实现,会降低threading整体执行效率
2. 任务超时监控本质采用重载的线程控制,无法监控到被监控线程中的使用了线程/子进程等复杂情况针对以上两点缺陷,增加了开关控制,允许不使用新增特性和方法,避免以上缺陷
如果task_timeout设置为0,不开启任务超时监控,则不影响整体执行效率