On Sat 10 Sep 2016 11:37, Panicz Maciej Godek <[email protected]> writes:

> is there any easy way to create a channel (queue) that could be used to
> communicate between threads? In particular, if the queue is empty, I would
> like the consumer to wait until something appears in it (pretty much like
> the channels in Clojure)

If you are using kernel threads, you can use something like:

  https://lists.gnu.org/archive/html/guile-devel/2012-02/msg00033.html

If you are using a user-space library for lightweight concurrency like
8sync or something, they usually have a channel abstraction.  There is
one in https://github.com/wingo/fibers, for example (and in that one,
the channels are themselves threadsafe and can be used for passing data
between fibers running on different kernel threads).  A new release is
coming later this evening but it requires the latest development Guile.

I think more generally, now is a time for a lot of experimentation in
the concurrency side of Guile; I look forward to seeing what people
settle on :)

Andy

Reply via email to