From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.devel Subject: Re: Redoing conditional thread support Date: 12 Oct 2002 00:49:57 +0200 Sender: guile-devel-admin@gnu.org Message-ID: <874rbsr3oq.fsf@zagadka.ping.de> References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1034376848 6632 127.0.0.1 (11 Oct 2002 22:54:08 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 11 Oct 2002 22:54:08 +0000 (UTC) Cc: guile-devel@gnu.org Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1808fW-0001iZ-00 for ; Sat, 12 Oct 2002 00:54:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 1808fV-0003uX-00; Fri, 11 Oct 2002 18:54:05 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 1808bc-0002h4-00 for guile-devel@gnu.org; Fri, 11 Oct 2002 18:50:04 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 1808bW-0002RF-00 for guile-devel@gnu.org; Fri, 11 Oct 2002 18:50:00 -0400 Original-Received: from dialin.speedway42.dip145.dokom.de ([195.138.42.145] helo=zagadka.ping.de) by monty-python.gnu.org with smtp (Exim 4.10) id 1808bV-0002Oj-00 for guile-devel@gnu.org; Fri, 11 Oct 2002 18:49:57 -0400 Original-Received: (qmail 26048 invoked by uid 1000); 11 Oct 2002 22:49:58 -0000 Original-To: Neil Jerram In-Reply-To: Original-Lines: 39 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:1534 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1534 Neil Jerram writes: > >>>>> "Marius" == Marius Vollmer writes: > > Marius> This should make it easier to write code that is thread > Marius> aware but doesn't require threads, like the thread-aware > Marius> sigaction function. > > Marius> Objections? > > Not really, but I'm not sure that this motivation makes sense in > detail, because we could (I think) provide a null implementation like > this in Scheme: > > (define-module (ice-9 thread-api-even-if-no-threads)) > > (or (defined? 'try-mutex) > (define (try-mutex m) #t)) > etc. That's what I plan to do, in essense. I want to do it on the C level, tho, so that C code can just pretend that there is always the concept of threads and doesn't need to special case when Guile is configured without real thread support. The thing is mostly finished, but I got a bit over-ambitious and implemented almost-real-mutices since Tom made me see that asyncs could be used to have some kind of cooperating concurrency and so even without real threads you might want to have mutices and condition variables, etc. Something to make a real thread head writhe, I'm afraid. > But perhaps there are other benefits? We can get rid of USE_THREADS and some code will become cleaner and easier to maintain. -- GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel