On 2018-07-01 15:09, Clément Lassieur wrote:
Amirouche Boubekki <amirou...@hypermove.net> writes:
Sorry, I did not read the code. What are you trying to achieve?
Within a fiber, I need to spawn several Guile-Git clones in parallel.
Since they block the Fibers scheduler, they need to be in separate
threads.
I tried that in the past it was working, but don't remember correctly
how I did.
epoll is dead seems to indicate that there is no fiber scheduler running
from the thread your are calling put-message. This might be a design
decision
or not. My understanding is that your code should work as intended.
Anyway, try to spawn the thread and/or create the channel before you
run fibers. I can't try that myself because of my slow connection which
takes ages to install guile-fibers.
Something like:
(define (test6)
(let ((channel (make-channel)))
(call-with-new-thread
(lambda ()
(put-message channel "hello world")))
(run-fibers
(lambda ()
(spawn-fiber
(lambda ()
(format #t "~a~%" (get-message channel)))))
#:drain? #t)))