From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B7E3B1382C5 for ; Sun, 29 Apr 2018 04:12:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0D889E081E; Sun, 29 Apr 2018 04:12:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D8B56E081E for ; Sun, 29 Apr 2018 04:12:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 16C6F335C72 for ; Sun, 29 Apr 2018 04:12:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4D5F1297 for ; Sun, 29 Apr 2018 04:12:44 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1524974785.2ab6eed08c9eafa29de6100b19c9c072b17b9167.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/util/_async/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/util/_async/PipeReaderBlockingIO.py pym/portage/util/_async/SchedulerInterface.py X-VCS-Directories: pym/portage/util/_async/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 2ab6eed08c9eafa29de6100b19c9c072b17b9167 X-VCS-Branch: master Date: Sun, 29 Apr 2018 04:12:44 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: d0ae7069-92b0-4d29-9530-68ff38684301 X-Archives-Hash: 0439568eba266caf1a62c34627ddae5a commit: 2ab6eed08c9eafa29de6100b19c9c072b17b9167 Author: Zac Medico gentoo org> AuthorDate: Sun Apr 29 04:06:25 2018 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Apr 29 04:06:25 2018 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=2ab6eed0 PipeReaderBlockingIO._reader_thread: asyncio compat (bug 653856) Use call_soon_threadsafe for asyncio compatibility, and also remove idle_add from SchedulerInterface since there are no more consumers. Bug: https://bugs.gentoo.org/653856 pym/portage/util/_async/PipeReaderBlockingIO.py | 3 +-- pym/portage/util/_async/SchedulerInterface.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pym/portage/util/_async/PipeReaderBlockingIO.py b/pym/portage/util/_async/PipeReaderBlockingIO.py index b426f7695..0727d2c6a 100644 --- a/pym/portage/util/_async/PipeReaderBlockingIO.py +++ b/pym/portage/util/_async/PipeReaderBlockingIO.py @@ -55,7 +55,7 @@ class PipeReaderBlockingIO(AbstractPollTask): del self._threads[f] if not self._threads: # Thread-safe callback to EventLoop - self.scheduler.idle_add(self._eof) + self.scheduler.call_soon_threadsafe(self._eof) break f.close() @@ -64,7 +64,6 @@ class PipeReaderBlockingIO(AbstractPollTask): if self.returncode is None: self.returncode = os.EX_OK self._async_wait() - return False def _cancel(self): self._terminate.set() diff --git a/pym/portage/util/_async/SchedulerInterface.py b/pym/portage/util/_async/SchedulerInterface.py index ab2a70852..acacf7c31 100644 --- a/pym/portage/util/_async/SchedulerInterface.py +++ b/pym/portage/util/_async/SchedulerInterface.py @@ -1,4 +1,4 @@ -# Copyright 2012-2013 Gentoo Foundation +# Copyright 2012-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import gzip @@ -14,7 +14,6 @@ class SchedulerInterface(SlotObject): _event_loop_attrs = ("IO_ERR", "IO_HUP", "IO_IN", "IO_NVAL", "IO_OUT", "IO_PRI", "child_watch_add", - "idle_add", "io_add_watch", "iteration", "source_remove",