forked from Ponysearch/Ponysearch
[mod] search thread names
This commit is contained in:
parent
44409cb61f
commit
8e6ae188b8
1 changed files with 5 additions and 2 deletions
|
@ -36,12 +36,15 @@ number_of_searches = 0
|
||||||
def threaded_requests(requests):
|
def threaded_requests(requests):
|
||||||
for fn, url, request_args in requests:
|
for fn, url, request_args in requests:
|
||||||
th = threading.Thread(
|
th = threading.Thread(
|
||||||
target=fn, args=(url,), kwargs=request_args, name=url,
|
target=fn,
|
||||||
|
args=(url,),
|
||||||
|
kwargs=request_args,
|
||||||
|
name='search_request',
|
||||||
)
|
)
|
||||||
th.start()
|
th.start()
|
||||||
|
|
||||||
for th in threading.enumerate():
|
for th in threading.enumerate():
|
||||||
if th.name.startswith('http'):
|
if th.name == 'search_request':
|
||||||
th.join()
|
th.join()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue