Wait for threadpool kill with 1s timeout to fix memory leak test
This commit is contained in:
parent
d4b6f79746
commit
abee87bbec
1 changed files with 1 additions and 1 deletions
|
@ -50,7 +50,7 @@ class ThreadPool:
|
||||||
|
|
||||||
def kill(self):
|
def kill(self):
|
||||||
if self.pool is not None and self.pool.size > 0 and main_loop:
|
if self.pool is not None and self.pool.size > 0 and main_loop:
|
||||||
gevent.spawn(main_loop.call, self.pool.kill)
|
main_loop.call(lambda: gevent.spawn(self.pool.kill).join(timeout=1))
|
||||||
|
|
||||||
del self.pool
|
del self.pool
|
||||||
self.pool = None
|
self.pool = None
|
||||||
|
|
Loading…
Reference in a new issue