fix fd leak in run_in_bg
Notices this while debugging something entirely different.
This commit is contained in:
parent
8b2a59bf2e
commit
9b7eb8883c
|
@ -308,6 +308,8 @@ class Application:
|
||||||
fut = self.common['pool'].submit(func)
|
fut = self.common['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.common['loop'].watch_pipe(in_main_thread)
|
pipe = self.common['loop'].watch_pipe(in_main_thread)
|
||||||
|
|
Loading…
Reference in New Issue