We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
不是Ui卡来不动,而是不能代理了,一个包都代理不了,要强制退出后,再打开才能代理。macos arm版
The text was updated successfully, but these errors were encountered:
用了几天,真的很6,就是要卡死不知道为什么,写了段测试代码,发现主要是https的请求要卡住,麻烦看看。
import requests import time from concurrent.futures import ThreadPoolExecutor import urllib3 from multiprocessing import Process, Lock, Value urllib3.disable_warnings() def test(lock, Counter): while 1: proxies = { "http": "http://127.0.0.1:9000", "https": "http://127.0.0.1:9000", } url = 'https://www.xxxxxx.com/' # url = 'http://127.0.0.1:8000' try: requests.get(url, proxies=proxies, verify=False) except: pass with lock: Counter.value += 1 print(time.asctime(time.localtime(time.time())), Counter.value) def fun1(lock, Counter): with ThreadPoolExecutor(max_workers=100) as t: t.submit(test, lock, Counter) if __name__ == '__main__': process_list = [] lock = Lock() Counter = Value('i', 0) for i in range(50): p = Process(target=fun1, args=(lock, Counter)) p.start() process_list.append(p) for i in process_list: p.join()
Sorry, something went wrong.
MegatronKing
No branches or pull requests
不是Ui卡来不动,而是不能代理了,一个包都代理不了,要强制退出后,再打开才能代理。macos arm版
The text was updated successfully, but these errors were encountered: