guile-user
[Top][All Lists]
Advanced

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

Guile fibers return values


From: Zelphir Kaltstahl
Subject: Guile fibers return values
Date: Sat, 4 Jan 2020 23:49:38 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Icedove/52.9.1

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?

Regards,

Zelphir




reply via email to

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