From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Amirouche Boubekki Newsgroups: gmane.lisp.guile.devel Subject: Re: crashes with Fibers Date: Mon, 02 Jul 2018 00:32:43 +0200 Message-ID: References: <8736x63q5v.fsf@lassieur.org> <7d8d11cf58d7adba2ca826c7e58bddde@hypermove.net> <87muvb2jd2.fsf@lassieur.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1530484257 7316 195.159.176.226 (1 Jul 2018 22:30:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 1 Jul 2018 22:30:57 +0000 (UTC) User-Agent: Roundcube Webmail/1.1.2 Cc: guile-devel , guile-devel@gnu.org To: =?UTF-8?Q?Cl=C3=A9ment_Lassieur?= Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Jul 02 00:30:52 2018 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZkrr-0001m8-VW for guile-devel@m.gmane.org; Mon, 02 Jul 2018 00:30:52 +0200 Original-Received: from localhost ([::1]:55838 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZktx-0004kp-M1 for guile-devel@m.gmane.org; Sun, 01 Jul 2018 18:33:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZktq-0004kY-Bu for guile-devel@gnu.org; Sun, 01 Jul 2018 18:32:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZktp-0006bd-IG for guile-devel@gnu.org; Sun, 01 Jul 2018 18:32:54 -0400 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:40855) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fZkti-0006UO-VM; Sun, 01 Jul 2018 18:32:47 -0400 Original-Received: from webmail.gandi.net (unknown [10.200.201.2]) (Authenticated sender: amirouche@hypermove.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPA id 139DE60006; Sun, 1 Jul 2018 22:32:43 +0000 (UTC) In-Reply-To: <87muvb2jd2.fsf@lassieur.org> X-Sender: amirouche@hypermove.net X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.70.183.195 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.org gmane.lisp.guile.devel:19573 Archived-At: On 2018-07-01 15:09, Clément Lassieur wrote: > Amirouche Boubekki 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)))