all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tom Tromey <tom@tromey.com>
To: yyoncho <yyoncho@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Running process filters in another thread
Date: Mon, 01 Oct 2018 15:12:25 -0600	[thread overview]
Message-ID: <87wor1jrra.fsf@tromey.com> (raw)
In-Reply-To: <CACCVLQUQZiURXLow30V4xC_WtTba66PAwEJ0q8Sczxo+qXTG-w@mail.gmail.com> (yyoncho@gmail.com's message of "Fri, 28 Sep 2018 21:21:23 +0300")

>>>>> ">" == yyoncho  <yyoncho@gmail.com> writes:

>> I am not familiar with emacs internals and I am not sure whether this is doable
>> but I wonder whether providing the option to do the parsing(and probably more?)
>> in a separate thread and then call the *filter* function on emacs side in UI
>> thread with elisp data structures like lists, hashmaps etc. instead of raw
>> string is feasible which would be similar to what is happening in Javascript world.

As Eli and Stefan have pointed out, this isn't likely to gain
performance due to the global lock.

I wanted to point out, though, that it is possible to lock a process to
a thread.  (info "(elisp) Processes and Threads")  So part of what you
want is there.

I think it would be good for Emacs to experiment with less cooperative
thread scheduling.  This came up before and was rejected; I should have
spoken up then, since my view is that this really isn't all that
dangerous, because in practice there just aren't that many threaded
programs.  Also, this is a necessary step toward true multi threading.

Tom



      parent reply	other threads:[~2018-10-01 21:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-28 18:21 Running process filters in another thread yyoncho
2018-09-28 21:14 ` Eli Zaretskii
     [not found]   ` <CACCVLQUrpxuhKwaHbFfCSzYLfucL8x+tJOkwgKwK8bzb0VZaWg@mail.gmail.com>
2018-09-29  6:54     ` Fwd: " yyoncho
2018-09-29  7:37       ` Eli Zaretskii
2018-09-28 23:03 ` Stefan Monnier
2018-09-29  7:35   ` yyoncho
2018-09-29  8:15     ` Eli Zaretskii
2018-09-29 18:10     ` Stefan Monnier
2018-09-29 19:23       ` yyoncho
2018-09-29 20:30         ` Stefan Monnier
2018-09-30  7:08           ` yyoncho
2018-09-30 13:01             ` Stefan Monnier
2018-09-30 15:01               ` yyoncho
2018-10-01 21:12 ` Tom Tromey [this message]

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

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

  git send-email \
    --in-reply-to=87wor1jrra.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=emacs-devel@gnu.org \
    --cc=yyoncho@gmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.