[Top][All Lists]

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

Re: crashes with Fibers

From: Amirouche Boubekki
Subject: Re: crashes with Fibers
Date: Mon, 02 Jul 2018 00:41:43 +0200
User-agent: Roundcube Webmail/1.1.2

On 2018-07-02 00:32, Amirouche Boubekki wrote:
On 2018-07-01 15:09, Clément Lassieur wrote:
Amirouche Boubekki <address@hidden> 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

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.

You test5 code should definitly work. Otherwise, it requires to pre-allocate as many thread as you need before you know you will them. May be we can look at it backward and say, that allocating a pool of threads in advance is more
interesting performance wise.

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:

(use-modules (fibers))
(use-modules (fibers channels))

(define (test6)
  (let ((channel (make-channel)))
     (lambda ()
       (put-message channel "hello world")))
     (lambda ()
        (lambda ()
          (format #t "~a~%" (get-message channel)))))
    #:drain? #t)))

It works on my side.

reply via email to

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