emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Return value of finished threads


From: Tom Tromey
Subject: Re: Return value of finished threads
Date: Fri, 20 Jul 2018 12:14:04 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux)

>>>>> "Michael" == Michael Albinus <address@hidden> writes:

Michael> What I'm missing is a simple possibility to collect the return values 
of
Michael> the respective finished threads (`find-file-noselect' calls), which is 
a
Michael> buffer or a list of buffers.

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

This doesn't seem all that hard to implement.
Also if the thread exited due to an exception of some kind, this could
be propagated by thread-join as well.

Michael> The documentation recommends the use of
Michael> global variables, which would be inconvenient for many threads to 
supervise.

Or you can use a queue of some kind and have each worker push its result
there.

Tom



reply via email to

[Prev in Thread] Current Thread [Next in Thread]