[Top][All Lists]

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

Re: Guile fibers return values

From: Zelphir Kaltstahl
Subject: Re: Guile fibers return values
Date: Wed, 15 Jan 2020 01:04:19 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2

Hi Amirouche!

I am currently looking into using parallel forms, but am experiencing
some trouble with it (see other e-mail about possible bug in parallel

I would like to have more control over the maximum number of in parallel
running threads, when spawning tasks recursively. Parallel forms do not
offer to limit the maximum, except for the expensive parallel forms. And
those probably also do not offer it for recursive calls (in a task start
again multiple tasks to run in parallel, which is the case for building
the tree).

I need to look at your code in detail to understand, but from the
description or comments it looks promising for my use case.


On 1/14/20 11:59 AM, Amirouche Boubekki wrote:
> 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

reply via email to

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