From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: multi-threaded Emacs Date: Wed, 03 Dec 2008 15:14:16 -0500 Message-ID: References: <87abbiody1.fsf@master.homenet> <877i6l5d8s.fsf@master.homenet> <874p1npvtj.fsf@master.homenet> <87ej0qci8g.fsf@master.homenet> <87y6yxm7xr.fsf@master.homenet> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1228335402 21584 80.91.229.12 (3 Dec 2008 20:16:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Dec 2008 20:16:42 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: Giuseppe Scrivano Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 03 21:17:47 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L7yAM-0002O6-7Q for ged-emacs-devel@m.gmane.org; Wed, 03 Dec 2008 21:17:46 +0100 Original-Received: from localhost ([127.0.0.1]:35762 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7y9B-0002bx-Ss for ged-emacs-devel@m.gmane.org; Wed, 03 Dec 2008 15:16:33 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L7y98-0002bs-0C for emacs-devel@gnu.org; Wed, 03 Dec 2008 15:16:30 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L7y93-0002bg-RB for emacs-devel@gnu.org; Wed, 03 Dec 2008 15:16:28 -0500 Original-Received: from [199.232.76.173] (port=53512 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7y93-0002bd-Nb for emacs-devel@gnu.org; Wed, 03 Dec 2008 15:16:25 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]:8088 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L7y8y-0002zH-NZ; Wed, 03 Dec 2008 15:16:20 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAAt4NknO+Jkl/2dsb2JhbACBbdFAgn+BIw X-IronPort-AV: E=Sophos;i="4.33,709,1220241600"; d="scan'208";a="30608956" Original-Received: from 206-248-153-37.dsl.teksavvy.com (HELO pastel.home) ([206.248.153.37]) by ironport2-out.teksavvy.com with ESMTP; 03 Dec 2008 15:15:52 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id A7A0D8BAF; Wed, 3 Dec 2008 15:14:16 -0500 (EST) In-Reply-To: <87y6yxm7xr.fsf@master.homenet> (Giuseppe Scrivano's message of "Wed, 03 Dec 2008 19:26:24 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:106537 Archived-At: > Yes, I was referring to the cooperating threads model using a QUIT > macro. Actually, yielding in QUIT will take a lot of work. It's definitely not "cooperative" seen from Elisp's point of view (where QUIT can be run implicitly all over the place). By cooperative thread model, I mean that we can switch context either when we already do (i.e. when waiting for user/process/network input), or when running some new `yield' Elisp function. > How can it be used by gnus while fetching new data? Will it > give the control to another thread immediately after the trasfer begins? As written above (and earlier as well), Emacs will switch threads when waiting for network input. Stefan