From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Futures: Avoid creating the worker pool more than once Date: Thu, 08 Nov 2012 20:11:24 +0100 Message-ID: <87zk2rc3kz.fsf@gnu.org> References: <87a9uu9vpk.fsf@tines.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1352402123 816 80.91.229.3 (8 Nov 2012 19:15:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 8 Nov 2012 19:15:23 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Nov 08 20:15:32 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TWXZW-0003v2-1r for guile-devel@m.gmane.org; Thu, 08 Nov 2012 20:15:26 +0100 Original-Received: from localhost ([::1]:37542 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TWXZM-0008Fg-L2 for guile-devel@m.gmane.org; Thu, 08 Nov 2012 14:15:16 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:53035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TWXZJ-0008Ee-59 for guile-devel@gnu.org; Thu, 08 Nov 2012 14:15:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TWXZ9-0005NL-Kj for guile-devel@gnu.org; Thu, 08 Nov 2012 14:15:13 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:33768) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TWXZ9-0005LY-Eo for guile-devel@gnu.org; Thu, 08 Nov 2012 14:15:03 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TWXZD-0003h9-3x for guile-devel@gnu.org; Thu, 08 Nov 2012 20:15:07 +0100 Original-Received: from reverse-83.fdn.fr ([80.67.176.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Nov 2012 20:15:07 +0100 Original-Received: from ludo by reverse-83.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Nov 2012 20:15:07 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 11 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: reverse-83.fdn.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 18 Brumaire an 221 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:+4ouo8aqWXfCXF8f4daqz7Hor58= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:15129 Archived-At: Mark H Weaver skribis: > + ;; setting 'create-workers!' to a no-op is an optimization, but it is > + ;; still possible for '%create-workers!' to be called more than once > + ;; from different threads. Therefore, to avoid creating %workers more > + ;; than once (and thus creating too many threads), we check to make > + ;; sure %workers is empty within the critical section. Do you have a scenario where this happens? Ludo’.