[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch for fields of `struct buffer'
From: |
Stefan Monnier |
Subject: |
Re: Patch for fields of `struct buffer' |
Date: |
Tue, 01 Feb 2011 10:43:09 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> Other ideas I have been considering:
> Instead of explicit locks, just let any symbol function as a lock, and
> have the locks hidden in the C code. (Or an extension of this idea, let
> any Lisp object be a lock -- "Java style".)
As we discussed in the past, the first step is of course cooperative
threading, via context switches at I/O points, which is a "minor" tweak
to the current semantics (where we already have such switches but the
threads are nested, i.e. the main thread can only re-start once
the sub-thread (a process filter or sentinel) finishes).
If/when we'll get to finer grained concurrency, I think it makes sense
to use something that's as clean and high-level as possible: Elisp is
already slow and interpreted, so we can afford something "slow".
> Or, instead of the locks-and-condition-variables approach, go the CSP
> route and have channels and channel-select. This idea is making a
> comeback, maybe it would fit well in Emacs Lisp.
Erlang-style concurrency is nice and clean, but I'm not sure it'll
integrate well with existing code which stomps over a global state all
the time. This doesn't mean it won't work. If we can make it work
something like "one agent per buffer" and turn `set-buffer' into a kind
of message maybe we could get some good results, but it seems tricky.
Threads and locks don't look too good: too low-level. If we go in that
direction, then STM seems a lot more appealing.
Stefan
- Re: Patch for fields of `struct buffer', (continued)
- Re: Patch for fields of `struct buffer', Tom Tromey, 2011/02/06
- concurrency suggestions for Gnus (was: Patch for fields of `struct buffer'), Ted Zlatanov, 2011/02/07
- Re: concurrency suggestions for Gnus, Miles Bader, 2011/02/07
- Re: concurrency suggestions for Gnus, Andy Moreton, 2011/02/08
- Re: concurrency suggestions for Gnus, Justin Lilly, 2011/02/08
- bloom filters (was: concurrency suggestions for Gnus), Ted Zlatanov, 2011/02/08
- bloom filters (was: concurrency suggestions for Gnus), Stephen J. Turnbull, 2011/02/08
- Re: concurrency suggestions for Gnus, Lars Ingebrigtsen, 2011/02/10
Re: Patch for fields of `struct buffer', Stephen J. Turnbull, 2011/02/01
Re: Patch for fields of `struct buffer',
Stefan Monnier <=
- Re: Patch for fields of `struct buffer', Helmut Eller, 2011/02/01
- Re: Patch for fields of `struct buffer', Tom Tromey, 2011/02/06
- Re: Patch for fields of `struct buffer', Tom Tromey, 2011/02/08
- Re: Patch for fields of `struct buffer', Helmut Eller, 2011/02/08
- Re: Patch for fields of `struct buffer', Tom Tromey, 2011/02/11
- Re: Patch for fields of `struct buffer', Helmut Eller, 2011/02/12