From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: multi-threaded Emacs Date: Thu, 11 Dec 2008 08:41:21 -0600 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <86skouwz8u.fsf@lifelogs.com> References: <87abbiody1.fsf@master.homenet> <877i6l5d8s.fsf@master.homenet> <874p1npvtj.fsf@master.homenet> <87ej0qci8g.fsf@master.homenet> <87y6yxm7xr.fsf@master.homenet> <87hc5gyn9x.fsf@master.homenet> <87ej0ixx97.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 1229006597 8051 80.91.229.12 (11 Dec 2008 14:43:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Dec 2008 14:43:17 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 11 15:44:21 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 1LAmlE-0006aT-NM for ged-emacs-devel@m.gmane.org; Thu, 11 Dec 2008 15:43:28 +0100 Original-Received: from localhost ([127.0.0.1]:42544 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAmk3-00039P-CC for ged-emacs-devel@m.gmane.org; Thu, 11 Dec 2008 09:42:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LAmjy-00038m-8T for emacs-devel@gnu.org; Thu, 11 Dec 2008 09:42:10 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LAmjw-00038O-DK for emacs-devel@gnu.org; Thu, 11 Dec 2008 09:42:09 -0500 Original-Received: from [199.232.76.173] (port=49990 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAmjw-00038H-6b for emacs-devel@gnu.org; Thu, 11 Dec 2008 09:42:08 -0500 Original-Received: from main.gmane.org ([80.91.229.2]:37313 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LAmjv-0002Mf-P8 for emacs-devel@gnu.org; Thu, 11 Dec 2008 09:42:07 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LAmjm-0007at-I8 for emacs-devel@gnu.org; Thu, 11 Dec 2008 14:41:58 +0000 Original-Received: from 38.98.147.130 ([38.98.147.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Dec 2008 14:41:58 +0000 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Dec 2008 14:41:58 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 15 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 38.98.147.130 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:KO6MFPg/TRsl/082iSGY/VRylKQ= 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:106797 Archived-At: On Wed, 10 Dec 2008 20:59:41 -0500 Stefan Monnier wrote: SM> Further than that, we'd need more explicit synchronization SM> primitives. We could probably start with a (atomically &rest BODY) SM> which guarantees that BODY will be properly protected from other SM> threads that it will appear to be executed atomically. Such a SM> primitive should also include constraints such as "BODY cannot SM> include non-undoable operations", e.g. it can't save to a file. Would it help to look at the C level and figure out which functions are atomic (no I/O operations, IIUC), and perhaps mark them so with an attribute? Then any ELisp function that builds on atomics is atomic itself, presumably (except for macros and other trickery). Ted