[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: threads and kill-buffer
From: |
Tom Tromey |
Subject: |
Re: threads and kill-buffer |
Date: |
Wed, 05 Sep 2012 19:53:23 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
Tom> No, it really is impossible in the context of Emacs, even with
Tom> preemptive threads. The impossibility lies in the "GCd and reallocated"
Tom> step. If thread A has a handle on the buffer, then it cannot be GCd.
Stephen> Ah you're right. ... but subtract GC, and just have the buffer
Stephen> reallocated in thread B, and guess what happens?[1]
Subtracting GC doesn't make sense, since we're only talking about Emacs
here.
Stephen> So I didn't get it right, and you miss things, too.
Sure, I do, but not this:
Stephen> Footnotes:
Stephen> [1] enlarge_buffer_text() @ buffer.c, ~l.4819.
Things like this are why the threading implementation is cooperative.
But actually, even that is too strong. I think the implementation only
has to be cooperative as far as the C code in Emacs is concerned; and
that it can appear to be preemptive from the Lisp VM perspective. Task
switching during I/O is a step in that direction.
Full preemption at the C level is a harder proposition. I don't intend
to work on that.
Tom
- Re: threads and kill-buffer, (continued)
- Re: threads and kill-buffer, Lars Ingebrigtsen, 2012/09/04
- Re: threads and kill-buffer, Paul Eggert, 2012/09/04
- Re: threads and kill-buffer, Eli Zaretskii, 2012/09/04
- Re: threads and kill-buffer, Sam Steingold, 2012/09/05
- Re: threads and kill-buffer, Eli Zaretskii, 2012/09/05
- Re: threads and kill-buffer, Sam Steingold, 2012/09/05
- Re: threads and kill-buffer, Eli Zaretskii, 2012/09/05
- Re: threads and kill-buffer, Stephen J. Turnbull, 2012/09/05
- Re: threads and kill-buffer, Tom Tromey, 2012/09/05
- Re: threads and kill-buffer, Stephen J. Turnbull, 2012/09/05
- Re: threads and kill-buffer,
Tom Tromey <=
- Re: threads and kill-buffer, Stephen J. Turnbull, 2012/09/06
- Re: threads and kill-buffer, Stefan Monnier, 2012/09/05
- Re: threads and kill-buffer, Tom Tromey, 2012/09/05
- Re: threads and kill-buffer, Stefan Monnier, 2012/09/05
Re: threads and kill-buffer, Tom Tromey, 2012/09/05
- Re: threads and kill-buffer, Stephen J. Turnbull, 2012/09/05
- Re: threads and kill-buffer, Tom Tromey, 2012/09/05
- Re: threads and kill-buffer, Eli Zaretskii, 2012/09/05
- Re: threads and kill-buffer, Stephen J. Turnbull, 2012/09/05
- Re: threads and kill-buffer, Eli Zaretskii, 2012/09/06