GNU bug report logs -
#41531
27.0.91; Better handle asynchronous eldoc backends
Previous Next
Full log
Message #116 received at 41531 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi!
On 26.05.2020 17:53, Stefan Monnier wrote:
>> But really: now we have deadlock too? I just want to solve this
>> problem: please let's commit something, and move on to the next bug.
> Can you use the sample `eldoc-future-*` code I sent earlier?
How about the attached file for a rough, but a largely feature complete
first version of futures?
To remind from previous discussions, we wanted futures:
- To be cancelable, so that the issuer could abort their calculations,
if they so desire.
- Force-able, meaning the consumer should be able to "realize" the
future synchronously, with the future's creator being able to support
their, most optimal, version of that logic. The default needs to be
useful and reliable enough, though, that callers could use it in 99% of
cases anyway.
The error callback probably wasn't mentioned, but it seems logical to
have it anyway.
For the first two features, I also considered using cl-generic, but
result might turn out to be clunkier, and we need overridability only
for two of these functions. But suggestions welcome.
TBD:
- Probably rename to "promises" in the end.
- It would be nice to have a certain degree of compatibility with
Christopher Wellons's emacs-aio, so that its promises could be accepted
by code that expects "our" futures/promises. Not sure if we can do that
without making the API more complex (aio-resolve's signature comes to
mind), or if we adopt its approach, importing the package wholesale
might make more sense.
[future.el (text/x-emacs-lisp, attachment)]
This bug report was last modified 5 years and 39 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.