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 Subject: Re: Asynchronous event loop brainstorm at FSF 30 Date: Thu, 19 Nov 2015 13:27:38 +0000 Message-ID: <20151119132738.31a19e46@bother.homenet> References: <87k2r3tvzh.fsf@dustycloud.org> <20151004171540.7a4eeb3c@bother.homenet> <87io505xhy.fsf@dustycloud.org> <20151118102625.6b5d6d2e@bother.homenet> 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 1447939700 11252 80.91.229.3 (19 Nov 2015 13:28:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Nov 2015 13:28:20 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Nov 19 14:28:06 2015 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 1ZzPFb-0008A9-D7 for guile-devel@m.gmane.org; Thu, 19 Nov 2015 14:27:47 +0100 Original-Received: from localhost ([::1]:41598 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzPFa-0006KF-Ip for guile-devel@m.gmane.org; Thu, 19 Nov 2015 08:27:46 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzPFX-0006KA-FR for guile-devel@gnu.org; Thu, 19 Nov 2015 08:27:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZzPFU-0002vK-3i for guile-devel@gnu.org; Thu, 19 Nov 2015 08:27:43 -0500 Original-Received: from smtpout5.wanadoo.co.uk ([80.12.242.80]:17404 helo=smtpout.wanadoo.co.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzPFT-0002vD-Tp for guile-devel@gnu.org; Thu, 19 Nov 2015 08:27:40 -0500 Original-Received: from bother.homenet ([2.25.43.62]) by mwinf5d68 with ME id jRTc1r00d1LUlWi03RTcPM; Thu, 19 Nov 2015 14:27:37 +0100 X-ME-Helo: bother.homenet X-ME-Date: Thu, 19 Nov 2015 14:27:37 +0100 X-ME-IP: 2.25.43.62 Original-Received: from bother.homenet (localhost [127.0.0.1]) by bother.homenet (Postfix) with ESMTP id 4E9948496D for ; Thu, 19 Nov 2015 13:27:38 +0000 (GMT) In-Reply-To: <20151118102625.6b5d6d2e@bother.homenet> X-Mailer: Claws Mail 3.13.0 (GTK+ 2.24.28; i686-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.12.242.80 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:18045 Archived-At: On Wed, 18 Nov 2015 10:26:25 +0000 Chris Vine wrote: > On Tue, 17 Nov 2015 11:46:24 -0600 > Christopher Allan Webber wrote: > [snip] > > This sounds very interesting... is the source available? Could you > > point to it? > > > > Thanks! > > - Chris > > No it's not. I'll email you something. In case it's of use to others in looking at the options, I have now put the code here: http://www.cvine.plus.com/event-loop/event-loop.scm I have no problem with any parts of it going into guile if thought useful. I was inclined to apply the MIT license to it but that seems fairly pointless give that guile is covered by the LGPL. The interesting part is not so much the event loop but the use of coroutines to give "await" type semantics. This particular implementation does allow tasks to run in their own threads in a safe way. It works for my limited purposes but I imagine it could be much improved. Chris