emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch for fields of `struct buffer'


From: Daniel Colascione
Subject: Re: Patch for fields of `struct buffer'
Date: Tue, 01 Feb 2011 02:54:22 -0800
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7

On 1/31/11 11:04 AM, Tom Tromey wrote:
> 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.

While elegant, I'm afraid using symbols as locks would lead to a
proliferation of locks of code, not data. Using a symbol as a big global
lock is easier than using gensym to get per-object locks.

> (Or an extension of this idea, let
> any Lisp object be a lock -- "Java style".)

This approach has potential. I believe JVMs get away with this trick at
a cost of a machine word per object --- that's a big addition to a
simple cons cell, of which Emacs has quite a few.

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

Some sort of CSP facility would be interesting. I'd also love to see
Clojure-style STM, although I don't know how well something like an
agent would work in elisp's more imperative environment. Also, it'd
require lexbind to make sense at all.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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