[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: continuation passing in Emacs vs. JUST-THIS-ONE
From: |
Tomas Hlavaty |
Subject: |
Re: continuation passing in Emacs vs. JUST-THIS-ONE |
Date: |
Mon, 17 Apr 2023 22:51:22 +0200 |
On Wed 12 Apr 2023 at 09:13, Eli Zaretskii <eliz@gnu.org> wrote:
> Async subprocesses are currently the only feature in Emacs that
> provides an opportunity for writing asynchronous code.
Do you not consider, for example, using implementations of async/await
using promisses and CPS rewriting "writing asynchronous code"?
Do you not consider, for example, doing the same using callbacks as
"writing asynchronous code"?
>> I do not know how useable threads in Emacs are at the moment,
>> but they are already there and the examples I tried worked well.
>
> If you think Lisp threads in Emacs allow asynchronous processing, you
> are mistaken: they don't. Only one such thread can be running at any
> given time.
The examples I wrote worked fine with threads. The examples did not
require parallelism. I do not think that what you suggest disqualifies
threads for "writing asynchronous code".
It would be great to have better thread implementation, but that does
not seem to have anything to do with "writing asynchronous code".
Here is what I understand under synchronous code:
(plus 1 2)
returns 3 immediatelly
Here is what I understand under asynchronous code:
(plus 1 2)
returns something immediately
and then some time later 3 appers in the *Message* buffer, for
example
How that is achieved is an implementation (possibly leaky) detail.
It does not require anything running in parallel.
- Re: continuation passing in Emacs vs. JUST-THIS-ONE, Tomas Hlavaty, 2023/04/02
- Re: continuation passing in Emacs vs. JUST-THIS-ONE, Stefan Monnier, 2023/04/02
- Re: continuation passing in Emacs vs. JUST-THIS-ONE, Po Lu, 2023/04/03
- Re: continuation passing in Emacs vs. JUST-THIS-ONE, Tomas Hlavaty, 2023/04/10
- Re: continuation passing in Emacs vs. JUST-THIS-ONE, Stefan Monnier, 2023/04/10
- Re: continuation passing in Emacs vs. JUST-THIS-ONE, Tomas Hlavaty, 2023/04/11
- Re: continuation passing in Emacs vs. JUST-THIS-ONE, Stefan Monnier, 2023/04/11
- Re: continuation passing in Emacs vs. JUST-THIS-ONE, Tomas Hlavaty, 2023/04/11
- Re: continuation passing in Emacs vs. JUST-THIS-ONE, Eli Zaretskii, 2023/04/12
- Re: continuation passing in Emacs vs. JUST-THIS-ONE,
Tomas Hlavaty <=
- Re: continuation passing in Emacs vs. JUST-THIS-ONE, Eli Zaretskii, 2023/04/17
- Re: continuation passing in Emacs vs. JUST-THIS-ONE, Tomas Hlavaty, 2023/04/18
- Re: continuation passing in Emacs vs. JUST-THIS-ONE, Konstantin Kharlamov, 2023/04/18
- RE: [External] : Re: continuation passing in Emacs vs. JUST-THIS-ONE, Drew Adams, 2023/04/18
Re: continuation passing in Emacs vs. JUST-THIS-ONE, Emanuel Berg, 2023/04/02