From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: dick Newsgroups: gmane.emacs.devel Subject: Re: Why does this thread code crash my emacs? Date: Fri, 15 Oct 2021 20:08:18 -0400 Message-ID: <87y26tg7bh.fsf@dick> References: <87pms6jmuk.fsf@ddavies.net> <83r1cmi03z.fsf@gnu.org> <87bl3qrkzt.fsf@ddavies.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39526"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.14 (Gnus v5.14) Commercial/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Derek Davies Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Oct 16 02:09:48 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mbXGm-000A6r-2r for ged-emacs-devel@m.gmane-mx.org; Sat, 16 Oct 2021 02:09:48 +0200 Original-Received: from localhost ([::1]:49038 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mbXGj-0005Q4-V8 for ged-emacs-devel@m.gmane-mx.org; Fri, 15 Oct 2021 20:09:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mbXFS-0004Wd-1i for emacs-devel@gnu.org; Fri, 15 Oct 2021 20:08:27 -0400 Original-Received: from mail-qt1-x82f.google.com ([2607:f8b0:4864:20::82f]:35476) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mbXFP-0005Fo-V4 for emacs-devel@gnu.org; Fri, 15 Oct 2021 20:08:25 -0400 Original-Received: by mail-qt1-x82f.google.com with SMTP id c20so10311995qtb.2 for ; Fri, 15 Oct 2021 17:08:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=zntc0Lgudcs0Lyq5lQQR0LYtZjffjEMrEiV71GOBiXk=; b=Crny/RbH4Ya7lgAHoR7JOVK6RE5POi+la7+c7S1ZQEayJlb4xHBl65tvBRRDbMbiBO xlXp1c47hWqbSzhQiRlWf4fL95e+23/h9fogq+H0R2A3hxYLIVaI3WR/SCZTKVd092DA +3v66Jt0vCT1KmiuGmlopXOAYpTXBPYqEjKvgZbm+lPDj5oX48txgbaT7d20F9rQYMeq URx0TxQ5Zz7bXt3uRA7C1wt26/LfSRJGLk7aDZxOizo36bY81eUjlLdxiOiS4r3LrvTH P9OQfKIm6OGiGx2Askh4YxouyvhmMvxCxe5lNP8ee3Q2qKxebsXzcv8DMzfUVdwbDhLf jBPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=zntc0Lgudcs0Lyq5lQQR0LYtZjffjEMrEiV71GOBiXk=; b=SXuP5OTXBGnjXcOeHEOrUN800yj9RwK6N6S+cQjgcjvjX7rLuuJ2cIT16oi1HExpnV 25UekZjstJC6k86Sq8E9wdWVRD2k+3eAHgKnZQX+moxFchL5On32tpx+71G56ExSHRGe 8Ts4NQZ1gfyVrM/6vz9zO4f3Uw/S9p9zjj4z2DkpvJ9+JmfGCKEzoK/ouSxNAyLMlO3t 49zpTAkki2OCIor9BTCX69eWcJ/sEMLSyZ6zxgGtlnXxs7NpZIuGVa7YIjNha2/dbnfx pBfpQ6b1UxZAnclgJi22VAzjnhLhZaEyZJTA5Fr/W2VzPWXfLtSUx9dS018QbAl2wz/I qRKA== X-Gm-Message-State: AOAM532op3v3v6p4WMUH4rva+R9eJ17bg+qk27bBRKrfG7299SqvKXbO dGL27+Uoi4s6KOseLxgDPM7jacoRaoI= X-Google-Smtp-Source: ABdhPJwExYnYtej6AncZWisWdRRvo2gkFNl5PrUrIfMxXTn+cHWmUr2+V24uoY5sRWsao4QT+flYTw== X-Received: by 2002:a05:622a:170c:: with SMTP id h12mr16019042qtk.6.1634342899868; Fri, 15 Oct 2021 17:08:19 -0700 (PDT) Original-Received: from localhost ([68.237.93.126]) by smtp.gmail.com with ESMTPSA id g1sm3200838qkd.89.2021.10.15.17.08.19 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Oct 2021 17:08:19 -0700 (PDT) In-Reply-To: <87bl3qrkzt.fsf@ddavies.net> (Derek Davies's message of "Fri, 15 Oct 2021 18:17:26 -0400") Received-SPF: pass client-ip=2607:f8b0:4864:20::82f; envelope-from=dick.r.chiang@gmail.com; helo=mail-qt1-x82f.google.com X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:277147 Archived-At: 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))))))"