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 1BBE61382C5 for ; Sun, 29 Apr 2018 04:02:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3F7A8E081E; Sun, 29 Apr 2018 04:02:30 +0000 (UTC) Received: from smtp.gentoo.org (dev.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 1BFAFE081E for ; Sun, 29 Apr 2018 04:02:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 75D2A335C99 for ; Sun, 29 Apr 2018 04:02:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BAA8C290 for ; Sun, 29 Apr 2018 04:02:26 +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: <1524974506.123aee71d3e15c2b8b2d354902d83a8f8596fbeb.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/AsynchronousLock.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 123aee71d3e15c2b8b2d354902d83a8f8596fbeb X-VCS-Branch: master Date: Sun, 29 Apr 2018 04:02:26 +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: 0887c1d6-d63d-4c92-a79a-9ae856a5fc32 X-Archives-Hash: ab69b3189ddeb83f4daabfc7223006a9 commit: 123aee71d3e15c2b8b2d354902d83a8f8596fbeb Author: Zac Medico gentoo org> AuthorDate: Sun Apr 29 04:01:46 2018 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Apr 29 04:01:46 2018 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=123aee71 _LockThread._run_lock: asyncio compat (bug 653856) Use call_soon_threadsafe for asyncio compatibility. Bug: https://bugs.gentoo.org/653856 pym/_emerge/AsynchronousLock.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pym/_emerge/AsynchronousLock.py b/pym/_emerge/AsynchronousLock.py index 5cdfd98f6..2019adaab 100644 --- a/pym/_emerge/AsynchronousLock.py +++ b/pym/_emerge/AsynchronousLock.py @@ -140,13 +140,12 @@ class _LockThread(AbstractPollTask): def _run_lock(self): self._lock_obj = lockfile(self.path, wantnewlockfile=True) # Thread-safe callback to EventLoop - self.scheduler.idle_add(self._run_lock_cb) + self.scheduler.call_soon_threadsafe(self._run_lock_cb) def _run_lock_cb(self): self._unregister() self.returncode = os.EX_OK self._async_wait() - return False def _cancel(self): # There's currently no way to force thread termination.