[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Computing project-files in another thread
From: |
Tassilo Horn |
Subject: |
Computing project-files in another thread |
Date: |
Wed, 04 Sep 2019 18:11:17 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Computing project-files in another thread,
Tassilo Horn <=