unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Return value of finished threads
@ 2018-07-20 14:56 Michael Albinus
  2018-07-20 15:08 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Michael Albinus @ 2018-07-20 14:56 UTC (permalink / raw)
  To: emacs-devel

Hi,

these days I'm working on making Tramp thread-safe. This works already,
but is only part of the job.

The other part is *using* threads. My first use case I'll try to
implement is `find-file' with wildcards. That is, for every single file
to be loaded, an own thread is created. A user indicates this
interactively by a prefix argument like "C-u M-x find-file ...".

What I'm missing is a simple possibility to collect the return values of
the respective finished threads (`find-file-noselect' calls), which is a
buffer or a list of buffers. The documentation recommends the use of
global variables, which would be inconvenient for many threads to supervise.

So I'm wondering if we could extend thread support by an indication of
the thread result, when finished. One idea would be that `thread-join'
returns with that value.

Another idea, even broader, would be to extend `condition-notify' by an
argument, which passes a Lisp object to another thread. The
corresponding `condition-wait' would return that value.

What do people think?

Best regards, Michael.



^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2018-07-23 18:02 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-20 14:56 Return value of finished threads Michael Albinus
2018-07-20 15:08 ` Eli Zaretskii
2018-07-20 15:15   ` Michael Albinus
2018-07-20 16:17     ` Clément Pit-Claudel
2018-07-20 17:25       ` Eli Zaretskii
2018-07-20 16:17 ` Noam Postavsky
2018-07-20 17:31   ` Eli Zaretskii
2018-07-21  9:28     ` Michael Albinus
2018-07-20 18:14 ` Tom Tromey
2018-07-21  9:39   ` Michael Albinus
2018-07-21 13:07     ` Tom Tromey
2018-07-21 13:16       ` Michael Albinus
2018-07-21 14:19         ` Tom Tromey
2018-07-21 14:33           ` Michael Albinus
2018-07-21 18:16             ` Tom Tromey
2018-07-21 19:33               ` Michael Albinus
2018-07-21 21:39                 ` Tom Tromey
2018-07-22 10:02                   ` Michael Albinus
2018-07-21 22:49         ` Brett Gilio
2018-07-22  2:18           ` Tom Tromey
2018-07-23 18:02             ` Brett Gilio

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