Merge pull request #523 from mwhudson/run_in_bg-fd-leak
fix fd leak in run_in_bg
This commit is contained in:
commit
1dfffbda01
|
@ -287,6 +287,8 @@ class Application:
|
||||||
fut = self.pool.submit(func)
|
fut = self.pool.submit(func)
|
||||||
|
|
||||||
def in_main_thread(ignored):
|
def in_main_thread(ignored):
|
||||||
|
self.common['loop'].remove_watch_pipe(pipe)
|
||||||
|
os.close(pipe)
|
||||||
callback(fut)
|
callback(fut)
|
||||||
|
|
||||||
pipe = self.loop.watch_pipe(in_main_thread)
|
pipe = self.loop.watch_pipe(in_main_thread)
|
||||||
|
|
Loading…
Reference in New Issue