[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Concurrency
From: |
Stefan Monnier |
Subject: |
Re: Concurrency |
Date: |
Sun, 28 Mar 2010 16:03:37 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> 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.
I.e. it's a "recursive/reentrant mutex".
> If the mutex is held by some other thread, blocks until it is
> available.
> (mutex-unlock MUTEX)
> Release the lock.
Sounds good. Could someone complete the above with a description of how
let-bindings work (and/or how they interact with buffer-local bindings)?
Also, a list of bugs/problem/issues would be handy,
Stefan
PS: And place this info in a file in the `concurrent' branch.
- 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, 2010/03/28
- Re: Concurrency,
Stefan Monnier <=
- 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
- Re: Concurrency, Tom Tromey, 2010/03/29