Patchwork worker: call selector.close() to release polling resources

login
register
mail settings
Submitter Yuya Nishihara
Date July 19, 2018, 12:45 p.m.
Message ID <1bbd55ffc97113dfbed4.1532004330@mimosa>
Download mbox | patch
Permalink /patch/32916/
State Accepted
Headers show

Comments

Yuya Nishihara - July 19, 2018, 12:45 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1532003784 -32400
#      Thu Jul 19 21:36:24 2018 +0900
# Node ID 1bbd55ffc97113dfbed4e8735c77b70ab124ce88
# Parent  25880ddf9a86dc8abb6e5ae3e4f0252425fae264
worker: call selector.close() to release polling resources
Augie Fackler - July 19, 2018, 5:58 p.m.
queued (on stable, before the rc tag) thanks!

> On Jul 19, 2018, at 08:45, Yuya Nishihara <yuya@tcha.org> wrote:
> 
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1532003784 -32400
> #      Thu Jul 19 21:36:24 2018 +0900
> # Node ID 1bbd55ffc97113dfbed4e8735c77b70ab124ce88
> # Parent  25880ddf9a86dc8abb6e5ae3e4f0252425fae264
> worker: call selector.close() to release polling resources
> 
> diff --git a/mercurial/worker.py b/mercurial/worker.py
> --- a/mercurial/worker.py
> +++ b/mercurial/worker.py
> @@ -212,6 +212,7 @@ def _posixworker(ui, func, staticargs, a
>         signal.signal(signal.SIGINT, oldhandler)
>         waitforworkers()
>         signal.signal(signal.SIGCHLD, oldchldhandler)
> +        selector.close()
>         status = problem[0]
>         if status:
>             if status < 0:
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/worker.py b/mercurial/worker.py
--- a/mercurial/worker.py
+++ b/mercurial/worker.py
@@ -212,6 +212,7 @@  def _posixworker(ui, func, staticargs, a
         signal.signal(signal.SIGINT, oldhandler)
         waitforworkers()
         signal.signal(signal.SIGCHLD, oldchldhandler)
+        selector.close()
         status = problem[0]
         if status:
             if status < 0: