unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Computing project-files in another thread
@ 2019-09-04 16:11 Tassilo Horn
  0 siblings, 0 replies; only message in thread
From: Tassilo Horn @ 2019-09-04 16:11 UTC (permalink / raw)
  To: emacs-devel

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-09-04 16:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-04 16:11 Computing project-files in another thread Tassilo Horn

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).