瀏覽代碼

[mod] search thread names

Adam Tauber 10 年之前
父節點
當前提交
8e6ae188b8
共有 1 個檔案被更改,包括 5 行新增2 行删除
  1. 5
    2
      searx/search.py

+ 5
- 2
searx/search.py 查看文件

36
 def threaded_requests(requests):
36
 def threaded_requests(requests):
37
     for fn, url, request_args in requests:
37
     for fn, url, request_args in requests:
38
         th = threading.Thread(
38
         th = threading.Thread(
39
-            target=fn, args=(url,), kwargs=request_args, name=url,
39
+            target=fn,
40
+            args=(url,),
41
+            kwargs=request_args,
42
+            name='search_request',
40
         )
43
         )
41
         th.start()
44
         th.start()
42
 
45
 
43
     for th in threading.enumerate():
46
     for th in threading.enumerate():
44
-        if th.name.startswith('http'):
47
+        if th.name == 'search_request':
45
             th.join()
48
             th.join()
46
 
49
 
47
 
50