guile-devel
[Top][All Lists]
Advanced

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

Re: Asynchronous event loop brainstorm at FSF 30


From: Christopher Allan Webber
Subject: Re: Asynchronous event loop brainstorm at FSF 30
Date: Tue, 17 Nov 2015 11:46:24 -0600

Chris Vine writes:

> It is certainly the case that mixing threads with coroutines is usually
> best avoided, otherwise it becomes very difficult to know what code
> ends up running in which particular thread and thread safety becomes a
> nightmare.  However, it would be good to allow a worker thread to post
> an event to the event loop safely, whereby the handler for the posted
> event would run in the event loop thread.  asyncio allows this.
>
> Although not particularly pertinent to this proposal, which looks
> great, I use coroutines implemented with guile's delimited
> continuations for a minimalist "await" wrapper over glib's event loop
> as provided by guile-gnome (the whole thing is about 20 lines of code),
> which appears (to the user) to serialize the GUI or other events posted
> to the event loop.  When I don't want to use guile-gnome, which is most
> of the time, I have my own (also minimalist) thread-safe event loop
> using guile's POSIX wrapper for select.
>
> My uses of guile are pretty undemanding so as I say these are
> minimalist.  Something like asyncio for guile would be very nice indeed.
>
> Chris

This sounds very interesting... is the source available?  Could you
point to it?

Thanks!
 - Chris



reply via email to

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