[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Asynchronous event loop brainstorm at FSF 30

From: Amirouche Boubekki
Subject: Re: Asynchronous event loop brainstorm at FSF 30
Date: Sun, 04 Oct 2015 15:24:48 +0200
User-agent: Roundcube Webmail/1.1.2


Please excuse my layman question in advance.

I find the idea awesome to work on asynchronous framework for Guile.

Le 2015-10-04 00:29, Christopher Allan Webber a écrit :
So David Thompson, Mark Weaver, Andrew Engelbrecht and I sat down to
talk over how we might go about an asynchronous event loop in Guile that
might be fairly extensible.  Here are some of what we discussed, in
bullet points:

 - General idea is to do something coroutine based.

IUC coroutine takes advantage of the ability to pause the execution of given procedure A to run a blocking operation B and execute some other procedure C while the blocking operation B is running. At some point, when the blocking operation B is finished, and C is finished, A restarts where it left.

 - This would be like asyncio or node.js, asynchronous but *not* OS
   thread based (it's too much work to make much of Guile fit around
   that for now)

 - If you really need to maximize your multiple cores, you can do
   multiple processes with message passing anyway

Does it mean that there will be one event loop per thread per process ?

 - So what we really need is a nice API for how to do coroutines, write
   asynchronous code, and work with some event loop with a scheduler

 - Probably a good way to start on this would be to use libuv (or is it
   libev?) and prototype this.  It's not clear if that's a good long
   term approach (eg, I think it doesn't work on the HURD for those who
   care about that, and Guix certainly does)

In asyncio the event loop can be swapped the default event loop is pure python. You mean that the first version will use libuv (libuv is the nodejs eventloop, formely based on libev).

 - Binary/custom ports could be a nice means of abstraction for this

So, that's our thoughts, maybe someone or one of us or maybe even *you*
will be inspired to start from here?

I don't want to make promises (pun on punpose) but I find this proposal really interesting.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]