[Top][All Lists]

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

Re: Guile fibers return values

From: Amirouche Boubekki
Subject: Re: Guile fibers return values
Date: Tue, 14 Jan 2020 10:59:18 +0000

Hello Zelphir!

Le sam. 4 janv. 2020 à 22:49, Zelphir Kaltstahl
<address@hidden> a écrit :
> Hello Guile users!
> I have questions regarding the usage of the fibers library. It seems,
> that I cannot find any way to get a computation result back from a
> fiber. I also cannot find anything about how to get a value back from a
> fiber, except for channels. The examples include one example using the
> procedure `make-channel`, to create one channel for a client to send to
> a server and one channel to use for the server to send messages to the
> client.
> Are channels the only way to get a computation result back from a fiber?
> Should I be creating channels, which the spawned fiber then can use on
> its own, to asynchronously give me a result?
> This is an aside of my actual project currently. I want to parallelize
> some algorithm and want to make use of fibers for that, but in order to
> do that, I must understand how to run multiple fibers and get their
> results back.
> Can you give me an example, where fibers are used to split up a
> computation heavy task so that it is sped up, because of running on
> multiple cores?

For that last bit, I have done the following in babelia:

I am wondering why the existing parallel for do not work for you:

> Regards,
> Zelphir

Amirouche ~

reply via email to

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