[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: |
Tue, 18 Apr 2023 07:01:13 +0200 |
On Tue 18 Apr 2023 at 05:25, Eli Zaretskii <eliz@gnu.org> wrote:
>> 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"?
>
> Not necessarily.
Fascinating.
>> >> 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.
>
> In my book, asynchronous means parallel processing, not just delayed
> results.
Interesting, this is the first time I encoutered such definition of
asynchronous.
- Re: continuation passing in Emacs vs. JUST-THIS-ONE, (continued)
- 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, 2023/04/17
- 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 <=
- 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
Re: continuation passing in Emacs vs. JUST-THIS-ONE, Lynn Winebarger, 2023/04/16
Re: continuation passing in Emacs vs. JUST-THIS-ONE, Jim Porter, 2023/04/18
Re: continuation passing in Emacs vs. JUST-THIS-ONE, Po Lu, 2023/04/18