Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行完之后怎么关闭run.py? #8

Open
kof0012 opened this issue Oct 23, 2017 · 1 comment
Open

运行完之后怎么关闭run.py? #8

kof0012 opened this issue Oct 23, 2017 · 1 comment

Comments

@kof0012
Copy link

kof0012 commented Oct 23, 2017

还不是很懂Linux命令,是要用pkill关掉吗?谢谢。

@ghost
Copy link

ghost commented Feb 23, 2019

原程序好像没有清理进程,我使用concurrent来创建进程池交给上下文管理器自动清理了:

from concurrent.futures import ProcessPoolExecutor as Pool
def run(self):
    print('Ip processing running')
    with Pool(2) as pool:
        pool.submit(Schedule.valid_proxy)
        pool.submit(Schedule.check_pool)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant