From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chris Vine Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.user Subject: Re: anyone define port types? Date: Thu, 23 Jun 2016 10:24:21 +0100 Message-ID: <20160623102421.3ff83743@bother.homenet> References: <87y492mnjp.fsf@pobox.com> <87pots9tag.fsf@gnu.org> <87bn37wtf2.fsf@pobox.com> <20160612092513.3eb1c8a3@laptop.homenet> <8760t5mthu.fsf@pobox.com> <20160619163327.36246706@dell.homenet> <8737o9kr3g.fsf@pobox.com> <20160619210912.48528ffa@dell.homenet> <20160620074503.6d06426b@dell.homenet> <87y460jou5.fsf@pobox.com> <20160620100157.530fc347@dell.homenet> <20160622234450.773f313f@bother.homenet> <8760t0qru7.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1466673891 803 80.91.229.3 (23 Jun 2016 09:24:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Jun 2016 09:24:51 +0000 (UTC) To: guile-user , guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Jun 23 11:24:39 2016 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 1bG0sG-00057I-B0 for guile-devel@m.gmane.org; Thu, 23 Jun 2016 11:24:36 +0200 Original-Received: from localhost ([::1]:35493 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bG0sF-0000F0-CW for guile-devel@m.gmane.org; Thu, 23 Jun 2016 05:24:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bG0sA-0000E7-Ol for guile-devel@gnu.org; Thu, 23 Jun 2016 05:24:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bG0s4-0005gb-D9 for guile-devel@gnu.org; Thu, 23 Jun 2016 05:24:29 -0400 Original-Received: from smtpout1.wanadoo.co.uk ([80.12.242.29]:39809 helo=smtpout.wanadoo.co.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bG0s4-0005gR-3i for guile-devel@gnu.org; Thu, 23 Jun 2016 05:24:24 -0400 Original-Received: from bother.homenet ([95.146.112.124]) by mwinf5d08 with ME id A9QN1t0032h5XBT039QNh7; Thu, 23 Jun 2016 11:24:22 +0200 X-ME-Helo: bother.homenet X-ME-Date: Thu, 23 Jun 2016 11:24:22 +0200 X-ME-IP: 95.146.112.124 Original-Received: from bother.homenet (localhost [127.0.0.1]) by bother.homenet (Postfix) with ESMTP id D5EC6126273; Thu, 23 Jun 2016 10:24:21 +0100 (BST) In-Reply-To: <8760t0qru7.fsf@pobox.com> X-Mailer: Claws Mail 3.13.1 (GTK+ 2.24.30; i686-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.12.242.29 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.lisp.guile.devel:18396 gmane.lisp.guile.user:12690 Archived-At: On Thu, 23 Jun 2016 09:36:48 +0200 Andy Wingo wrote: [snip] > Excellent. Though I think that eventually we will want to bless one > of these concurrency patterns as the default one, we're a long way > away from that, and even if we do bless one I think we will always > want to allow people to experiment and deploy different ones. So, > great, glad to hear you are doing work in this area :) A few things on that. First, there will always be a use for an event loop to do event-loopy things, irrespective of whether and how a coroutine interface is put around it. Sometimes you want to abstract things away, sometimes you don't. Secondly, as I understand it in the end you want pre-emptive "green" threads for guile, whereas my code equates to co-operative multi-tasking, whilst also working with native threads. I must come clean and say that I don't like "green" threads. Which leads on to the third point, which is that I would like to see guile match its words (in its documentation) with respect to native threads. I have found they work fine, with caution about shared global state. You think they don't, except possibly on intel, because some of its lock-free structures/variables -- and I think you are possibly referring to the VM here -- lack appropriate fences or other atomics. (The higher level C and scheme code has plainly had serious attempts at thread-safety made for it using mutexes.) Chris