Subject: Re: bug#64423: 29.0.92; save-interprogram-paste-before-kill doesn't prevent streaming large selections

From: Ihor Radchenko <[email-masked]>
Date: Tue, 04 Jul 2023 17:14:22 +0000

Eli Zaretskii <[email-masked]> writes:

>> I think Lisp threads shows that this is not true.
>
> If what I said were indeed not true, Lisp threads would have been a
> hot feature, used by every package out there.  That it is not so
> should teach us something.  I don't know if you tried to write a
> serious application based on Lisp threads, but if not, maybe you
> should try.

IMHO, the main problem with threads is that they cannot be "paused" at
arbitrary moment. So, without sprinkling too many `thread-yield', any
serious computation makes the main command loop unusable.

Org mode has asynchronous processing since before threads were
introduced, using idle timers. It works seamlessly, but only thanks to
carefully balanced `org-element-cache-sync-idle-time',
`org-element-cache-sync-duration', and `org-element-cache-sync-break'
that limit how aggressively the background async computation is fired.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>