Subject: bug#19016: 24.4.50; tq.el does the wrong thing when enqueuing inside a callback

From: Lars Ingebrigtsen <[email-masked]>
Date: Sat, 03 Aug 2019 16:33:54 +0200

Andreas Politz <[email-masked]> writes:

> tq-queue-pop removes the top question and sends the next one.  But here
> a problem occurs, if the callback function adds another question, sends
> it and waits for it's result.  Because this invokes tq-process-buffer
> recursively with the first question still at top.  Resulting in the
> callback to the first question called a second time, third time ... .
>
> Here is a lisp file which should demonstrate this.
>
>
> ..and a patch

Makes sense to me.  I've now applied this to Emacs 27.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no