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 12:04:22 +0200 Message-ID: <87aatrigux.fsf@thor.thematica.it> References: <27349166.post@talk.nabble.com> <27563610.post@talk.nabble.com> <4B7564C7.1010309@swipnet.se> <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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1269857101 8174 80.91.229.12 (29 Mar 2010 10:05:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 29 Mar 2010 10:05:01 +0000 (UTC) Cc: Tom Tromey , Ted Zlatanov , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 29 12:04:56 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 1NwBq2-0006la-Mt for ged-emacs-devel@m.gmane.org; Mon, 29 Mar 2010 12:04:54 +0200 Original-Received: from localhost ([127.0.0.1]:47383 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwBpx-00024o-Ah for ged-emacs-devel@m.gmane.org; Mon, 29 Mar 2010 06:04:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NwBpp-000239-8J for emacs-devel@gnu.org; Mon, 29 Mar 2010 06:04:41 -0400 Original-Received: from [140.186.70.92] (port=56725 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwBpm-00020e-Q4 for emacs-devel@gnu.org; Mon, 29 Mar 2010 06:04:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NwBpk-00075k-Vy for emacs-devel@gnu.org; Mon, 29 Mar 2010 06:04:38 -0400 Original-Received: from fg-out-1718.google.com ([72.14.220.153]:19929) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NwBpk-00075g-QS for emacs-devel@gnu.org; Mon, 29 Mar 2010 06:04:36 -0400 Original-Received: by fg-out-1718.google.com with SMTP id d23so764784fga.12 for ; Mon, 29 Mar 2010 03:04:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :references:date:in-reply-to:message-id:user-agent:mime-version :content-type; bh=H9wCTM+RQBvQrO+VG7VFTvoEhYvlUujYksJuOYRZK0A=; b=JkUCEn7dAh8NOK89jH96NUzYhF/ofQrakCCpq/tJgybMJY/5zN0a2D9I9Ww3ntH5QM 1ZtFs29zlPnYTXpxawU/gpcvuYufXiErHwkjQwgkIJAJO6rpYFTRb5+FPUi9bv9cZLum 18DLHoeecmW/+FoxjIhu5rJ+nn4rZFxS52N5o= 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=V+Li1pqrU7nCFXrf8X7j3ZHjAarHzbRMAJ044O3OWrdXk6wpVBAENCtLaA4I3YLP91 DvpMOUwYiBZDddiTuYq9ScIy/zDkQo1xdlCQVabA9xSl3iRLkux/cV3v5bX1rAqfy7lK wAt9DaJZHT0Es/WvgeDZBF9aIYh/Jp1clwUnM= Original-Received: by 10.86.239.8 with SMTP id m8mr9576517fgh.62.1269857075805; Mon, 29 Mar 2010 03:04:35 -0700 (PDT) Original-Received: from thor.thematica.it (host41-158-static.104-82-b.business.telecomitalia.it [82.104.158.41]) by mx.google.com with ESMTPS id 14sm2871620fxm.1.2010.03.29.03.04.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 29 Mar 2010 03:04:34 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Sun, 28 Mar 2010 19:18:49 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (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:122840 Archived-At: I have changed how `make-mutex' works. Now it accepts an optional argument; if the argument is non nil then a recursive mutex is created, by default it is nil. By default a normal mutex (non recursive) is created. I have also changed mutex-unlock on a recursive mutex to match the number of times it was mutex-lock'ed. To release a recursive mutex it must be unlocked as many times as it was locked. I have added a mutexp function that I forgot to add before. Giuseppe Stefan Monnier writes: >>>>> (mutex-lock MUTEX) >>>>> Acquire a mutex. If already held by this thread, returns. >>>> I.e. it's a "recursive/reentrant mutex". >>> Hmm -- is it fully recursive, where you must unlock it as many times as >>> you locked it? (I don't much care for the semi-recursive kind where one >>> unlock is sufficient regardless of the number of lock operations...) >> No, it is sufficient only one unlock to release it. > > Huh? That sounds like a bug, > > > Stefan