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: Concurrency Date: Mon, 29 Mar 2010 19:37:06 +0200 Message-ID: <87fx3jqbb1.fsf@gnu.org> References: <27349166.post@talk.nabble.com> <27564728.post@talk.nabble.com> <4B756FB7.3050202@swipnet.se> <87k4ui4gik.fsf@lola.goethe.zz> <27566385.post@talk.nabble.com> <87wryi2sjd.fsf@lola.goethe.zz> <27585994.post@talk.nabble.com> <87k4ucdmwh.fsf@stupidchicken.com> <87d3zweq4e.fsf@master.homenet> <87y6hg1h4a.fsf@thor.thematica.it> <87tys3j9fa.fsf@lifelogs.com> <87eij6tqmu.fsf@lifelogs.com> <49707.130.55.132.67.1269807922.squirrel@webmail.lanl.gov> <87oci8rwtw.fsf@gnu.org> <87aatrigux.fsf@thor.thematica.it> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1269884442 17341 80.91.229.12 (29 Mar 2010 17:40:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 29 Mar 2010 17:40:42 +0000 (UTC) Cc: Ted Zlatanov , Stefan Monnier , emacs-devel@gnu.org To: Tom Tromey Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 29 19:40:37 2010 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.69) (envelope-from ) id 1NwIx3-0002ff-HZ for ged-emacs-devel@m.gmane.org; Mon, 29 Mar 2010 19:40:37 +0200 Original-Received: from localhost ([127.0.0.1]:48378 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwIx2-0005ZV-UN for ged-emacs-devel@m.gmane.org; Mon, 29 Mar 2010 13:40:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NwItU-0003Ht-Dn for emacs-devel@gnu.org; Mon, 29 Mar 2010 13:36:56 -0400 Original-Received: from [140.186.70.92] (port=52922 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwItS-0003Go-VI for emacs-devel@gnu.org; Mon, 29 Mar 2010 13:36:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NwItS-0004Ut-1d for emacs-devel@gnu.org; Mon, 29 Mar 2010 13:36:54 -0400 Original-Received: from mail-bw0-f219.google.com ([209.85.218.219]:64432) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NwItP-0004UQ-PQ; Mon, 29 Mar 2010 13:36:51 -0400 Original-Received: by bwz19 with SMTP id 19so1758658bwz.26 for ; Mon, 29 Mar 2010 10:36:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:received:from:to:cc :subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=mbp8a3hGWESxXFNHG9Q8Pzb2QM6eskj/9h0a/HZgXPQ=; b=oZe89ICwFyFihH3LiJwEx65fyPFBMzUoFEuGHSopiHtUsfDJd/BPxAa6ntnLvnbN+o wUePJ5x4oVvTId0V2QBcoepQvqxj+cU+VHcPhcUbdje1l56mz1njauI3V4mXXpE/LBYx QZxv8iHvnECW246xmo1Y4cp/We5cdzlnKV/d8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=eMqMvG3H/Z48V9CvlF6JvQNgx6cIcVnX8rcijzr5VGa9F/uNkX4SUzhtVMFMJNvFUe JfCXFwIcQ/9cDp0x2X96ElgbZotXIGpdyVCxuBmmQK5e0ifqW8W8H1JTcUXvO8198TZ3 69iJnL9gwXxIvURWbAZd6Iy4pfgcmK+5NiMv8= Original-Received: by 10.204.131.82 with SMTP id w18mr261943bks.29.1269884210603; Mon, 29 Mar 2010 10:36:50 -0700 (PDT) Original-Received: from black ([188.152.231.27]) by mx.google.com with ESMTPS id 15sm2375331bwz.0.2010.03.29.10.36.49 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 29 Mar 2010 10:36:50 -0700 (PDT) Original-Received: from localhost ([127.0.0.1] helo=black) by black with esmtp (Exim 4.71) (envelope-from ) id 1NwItf-0001P6-2r; Mon, 29 Mar 2010 19:37:07 +0200 In-Reply-To: (Tom Tromey's message of "Mon, 29 Mar 2010 09:37:51 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.93 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:122857 Archived-At: Tom Tromey writes: > Also, I think mutex-unlock should throw some kind of error if the mutex > is owned by a different thread. What do you think of that? I think we should consider what will happen when the current cooperative threads model will be replaced and threads will run freely. In that case probably we will want to use pthread mutexes, not our implementation. Any invariant we introduce now, must be followed later as well or we will end to break code. Pthread specifications say for default mutex'es that the behaviour is undefined when you attempt to unlock a mutex owned by another thread, instead an error is returned when a recursive mutex is used. So I think we can rely on this error and introduce it only if we are not going to use default mutex'es, unless later we want to implement them on the top of recursive ones. What do you think? Cheers, Giuseppe