all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Arthur Miller <arthur.miller@live.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Experiment with threads - no concurrency?
Date: Mon, 06 Sep 2021 20:10:05 +0200	[thread overview]
Message-ID: <AM9PR09MB497738D0094789C029D8333296D29@AM9PR09MB4977.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <83o895r4mb.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 06 Sep 2021 20:33:16 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Arthur Miller <arthur.miller@live.com>
>> Cc: emacs-devel@gnu.org
>> Date: Mon, 06 Sep 2021 18:40:46 +0200
>> 
>> > You shouldn't.  Emacs doesn't switch threads on just any I/O, it
>> > switches threads when it waits for input from subprocesses, network,
>> > and keyboard.
>> 
>> Allright, so in order to exploit I/O concurrency here, the only way is to  start
>> another emacs process asynchronously?
>
> Yes, I think so, because in this case the I/O happens inside Emacs
> primitives.
>
>> Could split file list I get from
>> directory-files-recursively into say 4 parts, and process files in 4
>> processes. Is there any benefit to use threads in that case?
>
> No, I don't think so.
>
>> it takes like 3 seconds to parse all files in lisp dir sequentially
>
> You have tried that on relatively small directories, I think.

It was like all lisp that comes with Emacs :-) alis lisp dir in Emacs source
dir, I was looking for defuns and defmacros.

Anyway, thanks for the input, I'll look for the tests you mentioned in previous
mail, but it feels that I don't have much use of threads. Maybe if I had some
long running async process, I could check for results, but in this particular
case, I guess I have no use for threads.




      reply	other threads:[~2021-09-06 18:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-06 14:35 Experiment with threads - no concurrency? Arthur Miller
2021-09-06 15:17 ` Stefan Monnier
2021-09-06 16:35   ` Arthur Miller
2021-09-06 17:31     ` Eli Zaretskii
2021-09-06 17:38   ` T.V Raman
2021-09-06 18:11     ` Arthur Miller
2021-09-06 15:47 ` Eli Zaretskii
2021-09-06 16:40   ` Arthur Miller
2021-09-06 17:33     ` Eli Zaretskii
2021-09-06 18:10       ` Arthur Miller [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=AM9PR09MB497738D0094789C029D8333296D29@AM9PR09MB4977.eurprd09.prod.outlook.com \
    --to=arthur.miller@live.com \
    --cc=eliz@gnu.org \
    --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 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.