emacs-devel
[Top][All Lists]
Advanced

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

Re: Why does this thread code crash my emacs?


From: dick
Subject: Re: Why does this thread code crash my emacs?
Date: Fri, 15 Oct 2021 20:08:18 -0400
User-agent: Gnus/5.14 (Gnus v5.14) Commercial/28.0.50 (gnu/linux)

While the case in question is pedagogical (and as such, any workaround
comes to nothing), I cannot but indulge my urge to de-obfuscate
(cl-letf is a friend and patriot):

emacs-26.3 -Q -l cl --eval                                        \
"(lexical-let* ((thread2                                          \
                 (make-thread                                     \
                  (lambda ()                                      \
                    (cl-letf (((symbol-function (quote sit-for))  \
                               (lambda (secs &optional nodisp)    \
                                 (sleep-for secs)                 \
                                 (or nodisp (redisplay))          \
                                 t)))                             \
                      (hanoi 11)))))                              \
                (thread1                                          \
                 (make-thread                                     \
                  (lambda ()                                      \
                    (sleep-for 10)                                \
                    (thread-signal thread2 (quote error) nil))))))"



reply via email to

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