emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: run-with-timer vs run-with-idle-timer


From: Thien-Thi Nguyen
Subject: Re: run-with-timer vs run-with-idle-timer
Date: Thu, 10 May 2018 13:46:56 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

() João Távora <address@hidden>
() 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 ‘(accept-process-output ...)’
directly as (or as part of) CONDITION, using its return value.

-- 
Thien-Thi Nguyen -----------------------------------------------
 (defun responsep (query)
   (pcase (context query)
     (`(technical ,ml) (correctp ml))
     ...))                              748E A0E8 1CB8 A748 9BFA
--------------------------------------- 6CE4 6703 2224 4C80 7502

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]