[Top][All Lists]

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


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

reply via email to

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