From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.user Subject: Re: xchat-guile and threads Date: Fri, 23 Jan 2009 01:41:56 +0000 Message-ID: <49dd78620901221741v71bb833epcd12756a637fb275@mail.gmail.com> References: <38294b740901211546w7885807elc2d2d44d354a3f47@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1232674931 31782 80.91.229.12 (23 Jan 2009 01:42:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Jan 2009 01:42:11 +0000 (UTC) Cc: Guile User To: "Zeeshan Ali (Khattak)" Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Jan 23 02:43:24 2009 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LQB4t-0000s7-Co for guile-user@m.gmane.org; Fri, 23 Jan 2009 02:43:23 +0100 Original-Received: from localhost ([127.0.0.1]:51479 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LQB3b-000660-T0 for guile-user@m.gmane.org; Thu, 22 Jan 2009 20:42:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LQB3X-00063n-7q for guile-user@gnu.org; Thu, 22 Jan 2009 20:41:59 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LQB3W-000620-AY for guile-user@gnu.org; Thu, 22 Jan 2009 20:41:58 -0500 Original-Received: from [199.232.76.173] (port=41883 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LQB3W-00061q-65 for guile-user@gnu.org; Thu, 22 Jan 2009 20:41:58 -0500 Original-Received: from fg-out-1718.google.com ([72.14.220.157]:62662) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LQB3V-00083Q-QZ for guile-user@gnu.org; Thu, 22 Jan 2009 20:41:58 -0500 Original-Received: by fg-out-1718.google.com with SMTP id l26so2458080fgb.30 for ; Thu, 22 Jan 2009 17:41:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ifUZN5ETPofs/ZdCk2Fo5oMxOMchMFA5B9MEUtfkJok=; b=eKHl3V0JJBrP5T2wdRCR9x2DudMM/jlUMt/yTHwBOPlBYl7SsDaxm0Qqhw1/1r+Fdm qmddrPukCKOLdDGIQ+cUP+VBtdkj1neU2M8vqUD+nwu59KMEJvg3R0FTseoK8Lnx1pwH alv1t1swVQHJccrv5LHj053poDOcwuWzTcuhM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=dA7esLiKIq1vb+BVpJAmB7umg1o6hjiTUsFCKHwjOD28dqsPQWp8l27rAEYQ3C+q5Q aUiGCm471z5cETK6r0zyUsZkjIxbpfCGk6il6kRAPBVcndaUe6Mf6yRq2s05jRc+aVPr 9IERPZkbQzLyHbHzP2YWomMcOXu+sbCzDau20= Original-Received: by 10.86.95.8 with SMTP id s8mr524112fgb.28.1232674916092; Thu, 22 Jan 2009 17:41:56 -0800 (PST) In-Reply-To: <38294b740901211546w7885807elc2d2d44d354a3f47@mail.gmail.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:7082 Archived-At: 2009/1/21 Zeeshan Ali (Khattak) : > Hi all! > I am looking back at the code i wrote[1] some years back and I > don't seem to recall why i did somethings the way i did. One thing > that i can't remember is why I am doing threads and locking in there. > Given some thought, i called reading python plugin code a bit before > writing xchat-guile so i looked at the source and found this comment: [...] > So in those very early days of my flying lessons, I might have just > assumed I need to do the same in guile plugin as well. That sounds believable to me. Guile definitively doesn't have anything like a global interpreter lock; in theory it is possible to call the SCM API concurrently from as many threads as you like, and libguile will use fine-grained locks to protect anything that needs protecting. In practice, however, there are probably some bugs lurking... It's better overall if we find and fix those bugs. However, just in case they become unmanageable, you might want to keep your global lock around as a fallback, Regards, Neil