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 49B24138359 for ; Sat, 18 Jul 2020 23:54:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6D02BE086D; Sat, 18 Jul 2020 23:54:31 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 0AD2CE086D for ; Sat, 18 Jul 2020 23:54:30 +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 5752A34F22C for ; Sat, 18 Jul 2020 23:54:29 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 535E52D4 for ; Sat, 18 Jul 2020 23:54: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: <1595116365.f0a96005d3da49fa52624d7c3e4b9d1d12b831ad.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: lib/_emerge/SubProcess.py X-VCS-Directories: lib/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: f0a96005d3da49fa52624d7c3e4b9d1d12b831ad X-VCS-Branch: master Date: Sat, 18 Jul 2020 23:54: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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 6cef4e48-8499-4aad-9c96-d84bd6cc60c2 X-Archives-Hash: 25b63e39c820fdd5aa7251fff0affea2 commit: f0a96005d3da49fa52624d7c3e4b9d1d12b831ad Author: Zac Medico gentoo org> AuthorDate: Sat Jul 18 23:51:12 2020 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Jul 18 23:52:45 2020 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=f0a96005 SubProcess._async_waitpid: document override usage Signed-off-by: Zac Medico gentoo.org> lib/_emerge/SubProcess.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/_emerge/SubProcess.py b/lib/_emerge/SubProcess.py index e834cb7d3..f7353926c 100644 --- a/lib/_emerge/SubProcess.py +++ b/lib/_emerge/SubProcess.py @@ -48,9 +48,12 @@ class SubProcess(AbstractPollTask): def _async_waitpid(self): """ Wait for exit status of self.pid asynchronously, and then - set the returncode and notify exit listeners. This is - prefered over _waitpid_loop, since the synchronous nature - of _waitpid_loop can cause event loop recursion. + set the returncode, and finally notify exit listeners via the + _async_wait method. Subclasses may override this method in order + to implement an alternative means to retrieve pid exit status, + or as a means to delay action until some pending task(s) have + completed (such as reading data that the subprocess is supposed + to have written to a pipe). """ if self.returncode is not None: self._async_wait()