[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Concurrency
From: |
Tom Tromey |
Subject: |
Re: Concurrency |
Date: |
Sun, 28 Mar 2010 13:40:59 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Tom> Nope. However, there aren't really many new Emacs primitives.
Here's a quick rundown of the new primitives.
(run-in-thread FUNC)
Take a no-argument function as an argument.
Makes a new thread and calls the function.
(with-new-thread FORM)
A convenience macro that takes a form, wraps it in a lambda,
and calls run-in-thread.
(yield)
Yield control.
Emacs has semi-cooperative threading. Thread switches happen during
I/O or by explicit yield.
(make-mutex)
Make a new lock and return it
(mutex-lock MUTEX)
Acquire a mutex. If already held by this thread, returns.
If the mutex is held by some other thread, blocks until it is
available.
(mutex-unlock MUTEX)
Release the lock.
There is also a new variable, minibuffer-mutex. I think it is pretty
self-explanatory, but Giuseppe should probably explain it.
I don't have time to write demos or even proper documentation, I'm
afraid.
Giuseppe also has a patch of some kind to Gnus, but I didn't see it in
the tree, and I don't know exactly what it does.
Tom
- Concurrency (was: redisplay system of emacs), Stefan Monnier, 2010/03/05
- Re: Concurrency (was: redisplay system of emacs), Andreas Schwab, 2010/03/05
- Re: Concurrency (was: redisplay system of emacs), Giuseppe Scrivano, 2010/03/11
- Re: Concurrency (was: redisplay system of emacs), Giuseppe Scrivano, 2010/03/25
- Re: Concurrency, Ted Zlatanov, 2010/03/26
- Re: Concurrency,
Tom Tromey <=
- Re: Concurrency, Stefan Monnier, 2010/03/28
- Re: Concurrency, Davis Herring, 2010/03/28
- Re: Concurrency, Giuseppe Scrivano, 2010/03/28
- Re: Concurrency, Stefan Monnier, 2010/03/28
- Re: Concurrency, Giuseppe Scrivano, 2010/03/29
- Re: Concurrency, Tom Tromey, 2010/03/29
- Re: Concurrency, Stefan Monnier, 2010/03/29
- Re: Concurrency, Ken Raeburn, 2010/03/29
- Re: Concurrency, Stefan Monnier, 2010/03/29
- Re: Concurrency, Ken Raeburn, 2010/03/29