From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Giuseppe Scrivano Newsgroups: gmane.emacs.devel Subject: Re: multi-threaded Emacs Date: Sun, 07 Dec 2008 17:15:38 +0100 Message-ID: <87hc5gyn9x.fsf@master.homenet> 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 1228666646 24292 80.91.229.12 (7 Dec 2008 16:17:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Dec 2008 16:17:26 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 07 17:18:30 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 1L9MKW-0006kC-HG for ged-emacs-devel@m.gmane.org; Sun, 07 Dec 2008 17:18:00 +0100 Original-Received: from localhost ([127.0.0.1]:47344 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L9MJL-0000SN-BJ for ged-emacs-devel@m.gmane.org; Sun, 07 Dec 2008 11:16:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L9MIR-0008R3-4L for emacs-devel@gnu.org; Sun, 07 Dec 2008 11:15:51 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L9MIO-0008PE-V5 for emacs-devel@gnu.org; Sun, 07 Dec 2008 11:15:50 -0500 Original-Received: from [199.232.76.173] (port=35214 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L9MIO-0008P7-Q3 for emacs-devel@gnu.org; Sun, 07 Dec 2008 11:15:48 -0500 Original-Received: from joe.mail.tiscali.it ([213.205.33.54]:46434) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L9MIM-0008L8-RL; Sun, 07 Dec 2008 11:15:47 -0500 Original-Received: from master.homenet (84.222.170.162) by joe.mail.tiscali.it (8.0.022) id 48F74907029FD426; Sun, 7 Dec 2008 17:15:45 +0100 Original-Received: from gscrivano by master.homenet with local (Exim 4.69) (envelope-from ) id 1L9MIE-0000PJ-G6; Sun, 07 Dec 2008 17:15:38 +0100 In-Reply-To: (Richard M. Stallman's message of "Sat, 06 Dec 2008 14:25:57 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:106656 Archived-At: Hi, I uploaded here a patch with the current status of my work: http://it.gnu.org/~gscrivano/files/concurrent_threads_7_12.diff.gz The patch adds these Elisp primitives: (make-thread) (run-in-thread) (kill-thread) (yield) Now the garbage collector can be executed by any thread, local bindings are done as you suggested, the symbol value is changed when Emacs switches to another thread. Every thread has its own current_buffer so they can work independently on different buffers. New code is not very clean yet, differently from the first patch I submitted, now all thread local storage data is in a `thread_data' struct and (make-thread) returns an object. Any comment? (Good impressions are welcome). Giuseppe