unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-devel@gnu.org
Subject: Re: make-thread with lambda form instead of function symbol
Date: Mon, 17 Apr 2017 10:18:17 -0700	[thread overview]
Message-ID: <87vaq3kl5y.fsf@ericabrahamsen.net> (raw)
In-Reply-To: 878tmzynyl.fsf@ericabrahamsen.net

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Eli Zaretskii <eliz@gnu.org> 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!




  reply	other threads:[~2017-04-17 17:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-16 16:05 make-thread with lambda form instead of function symbol Eric Abrahamsen
2017-04-16 16:21 ` Noam Postavsky
2017-04-16 18:11   ` Eric Abrahamsen
2017-04-16 18:44     ` Noam Postavsky
2017-04-16 20:02       ` Eric Abrahamsen
2017-04-17  1:12 ` Eric Abrahamsen
2017-04-17  1:46   ` Noam Postavsky
2017-04-17  3:45     ` Eric Abrahamsen
2017-04-17  7:02       ` Eli Zaretskii
2017-04-17 16:54         ` Eric Abrahamsen
2017-04-17 17:18           ` Eric Abrahamsen [this message]
2017-04-17  6:51   ` Eli Zaretskii
2017-04-17  6:59   ` Andrew Cohen
2017-04-17 17:32     ` Eric Abrahamsen
2017-04-18  1:00       ` Andrew Cohen
2017-04-18  1:38         ` Eric Abrahamsen
2017-04-20  1:22     ` Eric Abrahamsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vaq3kl5y.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).