From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.devel Subject: Re: make-thread with lambda form instead of function symbol Date: Mon, 17 Apr 2017 10:18:17 -0700 Message-ID: <87vaq3kl5y.fsf@ericabrahamsen.net> References: <87efws9w3c.fsf@ericabrahamsen.net> <87bmrvu9am.fsf@ericabrahamsen.net> <87tw5n7l4g.fsf@ericabrahamsen.net> <83shl7ectl.fsf@gnu.org> <878tmzynyl.fsf@ericabrahamsen.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1492449559 28795 195.159.176.226 (17 Apr 2017 17:19:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 17 Apr 2017 17:19:19 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 17 19:19:15 2017 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 1d0AJ1-0007My-0Y for ged-emacs-devel@m.gmane.org; Mon, 17 Apr 2017 19:19:15 +0200 Original-Received: from localhost ([::1]:37990 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0AJ7-0008KI-12 for ged-emacs-devel@m.gmane.org; Mon, 17 Apr 2017 13:19:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0AIa-0008JB-2N for emacs-devel@gnu.org; Mon, 17 Apr 2017 13:18:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d0AIW-0008PU-S5 for emacs-devel@gnu.org; Mon, 17 Apr 2017 13:18:48 -0400 Original-Received: from [195.159.176.226] (port=36538 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d0AIW-0008PJ-LU for emacs-devel@gnu.org; Mon, 17 Apr 2017 13:18:44 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1d0AIP-0006Ub-1U for emacs-devel@gnu.org; Mon, 17 Apr 2017 19:18:37 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 29 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:BMBNHbQmJFTuhT0D0dPF43+I3ew= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:214082 Archived-At: Eric Abrahamsen writes: > Eli Zaretskii writes: [...] >> What does it mean "moved" in this context? How did you try to "move" >> a process to another thread? >> >> The ELisp manual says: >> >> ... by default a process is locked to the thread >> that created it. When a process is locked to a thread, output from the >> process can only be accepted by that thread. >> >> If you want to be able to accept process output from a thread other >> than the one which created it, you need to call set-process-thread. > > Okay that certainly explains it -- I hadn't found that part of the > manual. The IMAP process in question was long-running, created well > before this thread was, so I was doing exactly the wrong thing. (All I > meant by "move" was starting the process in one thread, and accepting > its output in another.) > > Segfault's gone, thank you. Now to figure out where to stick the call to > `set-process-thread'. I tried unlocking all IMAP processes early on, when they're first created, and so far it seems to be working great!