callback_handler.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:image-turk 作者: kostyaev 项目源码 文件源码
def __init__(self, worker_func, task_count, worker_count=-1):
        # initialize completion task worker pool
        # if number of workers is not specified, set it to the number of CPUs
        if worker_count == -1:
            worker_count = cpu_count()
        self.worker_pool = pool.Pool(size=worker_count)
        self.worker_pool_closed = False
        # store requested task count and callback function
        self.task_count = task_count
        self.worker_func = worker_func
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号