[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs design and architecture. How about copy-on-write?
From: |
Ihor Radchenko |
Subject: |
Re: Emacs design and architecture. How about copy-on-write? |
Date: |
Mon, 18 Sep 2023 13:55:47 +0000 |
Po Lu <luangruo@yahoo.com> writes:
> I suggest that people interested in a multi-threaded Emacs answer these
> two questions instead:
>
> - Is there a portable (in POSIX) method for reliably stopping a POSIX
> thread, with all callee-saved registers and register variables
> within leaf functions saved to the stack or some other area in
> memory?
This question sounds like a part of a specific implementation detail you
have in mind. May you share more context?
> - How will finalizers, buffer modification hooks, symbol value
> watchers and the like be executed in response to garbage collection,
> buffer modification, or setting symbols in non-main threads?
1. finalizers
AFAIU, you are referring to GC finalizers.
But is GC thread-safe?
2. symbol value watchers are triggered by let-bindings among other
things. At least for let-binding triggers, it makes sense to keep the
thread-local context for value watchers. I see not why other kind of
triggers should not keep the modifier thread context either.
Of course, one might want to process triggers in a separate thread,
but that may be done by explicitly spawning one.
3. modification hooks are always triggered within a single buffer.
According to previous discussions, we concluded that it would be
difficult to allow multiple threads modify the same buffer, so,
similar to watchers, thread context may be important, and the hooks
should probably run from within the trigger tread.
> Just two cents from someone who actually _HAS_ a multi-processing Emacs
> in a quasi-functional state.
Is it available anywhere in public repository?
--
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>
- Re: Emacs design and architecture. How about copy-on-write?, (continued)
- Re: Emacs design and architecture. How about copy-on-write?, Dmitry Gutov, 2023/09/20
- Re: Emacs design and architecture. How about copy-on-write?, Eli Zaretskii, 2023/09/21
- Re: Emacs design and architecture. How about copy-on-write?, Ihor Radchenko, 2023/09/20
- Re: Emacs design and architecture. How about copy-on-write?, Eli Zaretskii, 2023/09/20
- Re: Emacs design and architecture. How about copy-on-write?, Po Lu, 2023/09/18
- Re: Emacs design and architecture. How about copy-on-write?, Po Lu, 2023/09/18
- Re: Emacs design and architecture. How about copy-on-write?,
Ihor Radchenko <=
- Re: Emacs design and architecture. How about copy-on-write?, Eli Zaretskii, 2023/09/18
- Re: Emacs design and architecture. How about copy-on-write?, Po Lu, 2023/09/18
- Re: Emacs design and architecture. How about copy-on-write?, Eli Zaretskii, 2023/09/19
- Re: Emacs design and architecture. How about copy-on-write?, Po Lu, 2023/09/19
- Re: Emacs design and architecture. How about copy-on-write?, Eli Zaretskii, 2023/09/20
- Re: Emacs design and architecture. How about copy-on-write?, Po Lu, 2023/09/20
- Re: Emacs design and architecture. How about copy-on-write?, Eli Zaretskii, 2023/09/20
- Re: Emacs design and architecture. How about copy-on-write?, Dmitry Gutov, 2023/09/20
- Re: Emacs design and architecture. How about copy-on-write?, Eli Zaretskii, 2023/09/21
- Re: Emacs design and architecture. How about copy-on-write?, Ihor Radchenko, 2023/09/21