From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.devel Subject: Re: run-with-timer vs run-with-idle-timer Date: Thu, 10 May 2018 13:46:56 +0200 Message-ID: <87a7t74tsf.fsf@gnuvola.org> References: <87tvrgd972.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1525953342 14046 195.159.176.226 (10 May 2018 11:55:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 10 May 2018 11:55:42 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 10 13:55:37 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fGkAb-0003Yr-6i for ged-emacs-devel@m.gmane.org; Thu, 10 May 2018 13:55:37 +0200 Original-Received: from localhost ([::1]:33278 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGkCi-0002KG-7f for ged-emacs-devel@m.gmane.org; Thu, 10 May 2018 07:57:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGkCZ-0002Jv-Hd for emacs-devel@gnu.org; Thu, 10 May 2018 07:57:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGkCU-0005NF-NS for emacs-devel@gnu.org; Thu, 10 May 2018 07:57:39 -0400 Original-Received: from mail.agora-net.com ([67.59.132.6]:33998) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGkCU-0005NB-It for emacs-devel@gnu.org; Thu, 10 May 2018 07:57:34 -0400 Original-Received: from ttn by mail.agora-net.com with local (Exim 4.82) (envelope-from ) id 1fGkCS-0003JY-BP; Thu, 10 May 2018 07:57:32 -0400 Original-Received: from ttn by zigzag.favinet with local (Exim 4.80) (envelope-from ) id 1fGk2N-00048e-0A; Thu, 10 May 2018 13:47:07 +0200 In-Reply-To: <87tvrgd972.fsf@gmail.com> (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vor?= =?utf-8?Q?a=22's?= message of "Wed, 09 May 2018 18:34:41 +0100") X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: ttn@gnuvola.org X-SA-Exim-Scanned: No (on mail.agora-net.com); SAEximRunCond expanded to false X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 67.59.132.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:225195 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable () Jo=C3=A3o T=C3=A1vora () Wed, 09 May 2018 18:34:41 +0100 (while t..) spin is a common way to wait for async conditions Why not check the condition directly, i.e., s/t/CONDITION/ like: (while CONDITION (accept-process-output ...)) That is more precise, no? Another idea, if there is some expected traffic, is to use =E2=80=98(accept-process-output ...)=E2=80=99 directly as (or as part of) CONDITION, using its return value. =2D-=20 Thien-Thi Nguyen ----------------------------------------------- (defun responsep (query) (pcase (context query) (`(technical ,ml) (correctp ml)) ...)) 748E A0E8 1CB8 A748 9BFA =2D-------------------------------------- 6CE4 6703 2224 4C80 7502 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlr0MTQACgkQZwMiJEyAdQJVkACcCnC9OhAz/b8orf04bNdTKYee olIAnjMlGo0VV9b9K1pH+ejwYo4pTixi =Awe6 -----END PGP SIGNATURE----- --=-=-=--