From: Tassilo Horn <tsdh@gnu.org>
To: emacs-devel@gnu.org
Subject: Computing project-files in another thread
Date: Wed, 04 Sep 2019 18:11:17 +0200 [thread overview]
Message-ID: <87y2z46nyy.fsf@gnu.org> (raw)
Hi all,
I started using Raven [1] which is something similar to Helm. I.e., you
have a list of sources like buffers and recent files and get a nice
completion UI for switching buffers and finding files.
I added another source for project files which calls `project-files' in
projects recognized by project.el. That blocked the UI for large
projects because `project-files' essentially uses find using
`shell-command-to-string', and that might take a while.
So I tried computing `project-files' in another thread which initially
keeps the UI responsive, but as soon as the new thread becomes the
active one, the UI blocks again.
I assume that's because below `shell-command-to-string' there's no
`thread-yield' call, right? Does anyone know a strategically good place
to put a `thread-yield', or do we need to rewrite `project-files'
somehow to make thread-switching during a call to it possible?
Thanks for any pointers!
Tassilo
[1] https://github.com/chameco/raven
reply other threads:[~2019-09-04 16:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=87y2z46nyy.fsf@gnu.org \
--to=tsdh@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.