[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Experiment with threads - no concurrency?
From: |
Eli Zaretskii |
Subject: |
Re: Experiment with threads - no concurrency? |
Date: |
Mon, 06 Sep 2021 20:33:16 +0300 |
> 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.