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.user Subject: Re: Potluck - thread safe event loop with await semantics Date: Mon, 22 Feb 2016 13:01:01 +0100 Message-ID: <878u2dosxu.fsf@gnu.org> References: <20160216214512.42e6fd39@bother.homenet> 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 1456142522 17141 80.91.229.3 (22 Feb 2016 12:02:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Feb 2016 12:02:02 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Feb 22 13:01:53 2016 Return-path: Envelope-to: guile-user@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 1aXpBP-000801-P5 for guile-user@m.gmane.org; Mon, 22 Feb 2016 13:01:44 +0100 Original-Received: from localhost ([::1]:48653 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXpBP-0001IL-5Z for guile-user@m.gmane.org; Mon, 22 Feb 2016 07:01:43 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37146) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXpB7-0001Dl-70 for guile-user@gnu.org; Mon, 22 Feb 2016 07:01:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aXpB2-0003fU-8V for guile-user@gnu.org; Mon, 22 Feb 2016 07:01:25 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:39831) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXpB2-0003ez-2C for guile-user@gnu.org; Mon, 22 Feb 2016 07:01:20 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aXpAu-0007Xq-Cc for guile-user@gnu.org; Mon, 22 Feb 2016 13:01:12 +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 ; Mon, 22 Feb 2016 13:01:12 +0100 Original-Received: from ludo by reverse-83.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Feb 2016 13:01:12 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 19 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: 4 =?utf-8?Q?Vent=C3=B4se?= an 224 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x3D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:ioIGbZAZwH2SO63l7mY1PtmEVok= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:12421 Archived-At: Chris Vine skribis: > It features an a-sync procedure (in coroutines.scm) which can be used to > provide await semantics on asynchronous code (so as to remedy inversion > of control), and will work with callbacks for any event loop, including > the glib event loop wrapped by guile-gnome. More to the point, it also > provides a thread safe event loop for guile (event-loop.scm) with > support for watches on ports/file descriptors, and now supports proper > timeouts, and permits events to be posted by other tasks. This > includes tasks running on other threads, for which there is a helper > procedure a-sync-run-task-in-thread. Interesting. Have you tried to integrate it with one of the object-oriented event loops like in GLib? (Back in the day I thinking about something like that to avoid the callback hell in Guile-Avahi.) Thanks for the tasty dish! :-) Ludo’.