From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Martin Stjernholm Newsgroups: gmane.emacs.devel Subject: Re: What's the problem? Date: Sun, 14 Dec 2003 04:21:49 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <5b8ylgulrm.fsf@lister.roxen.com> References: <4nllpt3hr3.fsf@lockgroove.bwh.harvard.edu> <5bad69zd43.fsf@lister.roxen.com> <4noeuon378.fsf@lockgroove.bwh.harvard.edu> <4ny8tsgxy6.fsf@lockgroove.bwh.harvard.edu> <4nhe0ggv0u.fsf@lockgroove.bwh.harvard.edu> <4nk75bwjaf.fsf@lockgroove.bwh.harvard.edu> <4nsmjv8d32.fsf@collins.bwh.harvard.edu> <4nu14b6q33.fsf@collins.bwh.harvard. <4nad60og84.fsf@collins.bwh.harvard.edu> <4ny8tjryy8.fsf@collins.bwh.harvard.edu> < NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1071372411 27482 80.91.224.253 (14 Dec 2003 03:26:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 14 Dec 2003 03:26:51 +0000 (UTC) Cc: jas@extundo.com, Ted Zlatanov , stefan.monnier@yale.edu, emacs-devel@gnu.org, miles@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun Dec 14 04:26:42 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AVMu2-0007X3-00 for ; Sun, 14 Dec 2003 04:26:42 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AVMu1-0006zi-00 for ; Sun, 14 Dec 2003 04:26:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AVNno-0000yA-CR for emacs-devel@quimby.gnus.org; Sat, 13 Dec 2003 23:24:20 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AVNnQ-0000rz-IJ for emacs-devel@gnu.org; Sat, 13 Dec 2003 23:23:56 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AVNmt-0000eW-35 for emacs-devel@gnu.org; Sat, 13 Dec 2003 23:23:55 -0500 Original-Received: from [194.52.182.190] (helo=mail.roxen.com) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AVNms-0000dS-NM; Sat, 13 Dec 2003 23:23:22 -0500 Original-Received: by mail.roxen.com (Postfix, from userid 52) id EAD8E9A4C; Sun, 14 Dec 2003 04:21:54 +0100 (MET) Original-Received: from lister.roxen.com (lister.roxen.com [194.52.182.147]) by mail.roxen.com (Postfix) with ESMTP id AB0759A49; Sun, 14 Dec 2003 04:21:48 +0100 (MET) Original-Received: from mast by lister.roxen.com with local (Exim 3.36 #1 (Debian)) id 1AVMpJ-0003aR-00; Sun, 14 Dec 2003 04:21:49 +0100 Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Sat, 13 Dec 2003 18:15:00 -0500") User-Agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/20.7 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:18680 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:18680 Richard Stallman wrote: > /.../ So thread-switching would take some time. We would want to > make sure it does not happen very often. That's a good design principle anyway since thread switches never are very cheap. Avoiding fine grained locking is afaics the best way to ensure that thread switches happens seldom. With only buffer local locks, every callback would normally run to completion in a single thread slice since threads can't lock out each other. Thread switches would only occur when things have blocked in I/O (and speed isn't a factor then), or when cpu bound work is preempted.