[Top][All Lists]

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

Re: advice needed for multi-threading patch

From: Stefan Monnier
Subject: Re: advice needed for multi-threading patch
Date: Thu, 24 Sep 2009 13:29:31 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

> As Tom said, I was experimenting with gnus and it made me quite
> optimistic; in fact these commands are completed successfully:

>   (run-in-thread '(gnus) t) ;; with t the thread doesn't attempt to get
>                             ;; a lock on the buffer.
>   (while (yield)) ;; yield returns nil when there are not other
>                   ;; threads -- simulate join.

That's wonderful.  Does that mean that Gnus really runs in its own
thread while you can do normal editing in other buffers?

> Following your advice to don't allow a switch only when buffer-local
> variables are let-bound by the thread, how many times it happens than a
> thread let-bound these variables?  Let's say on 100 times, how many
> times approximately do you think a switch will not be allowed and the
> calling thread blocked?

I have no idea.  I don't think the number of such situations (counted
dynamically) is very important.  What matters is the number of places in
the source code where this is problematic.


reply via email to

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