GNU bug report logs - #32121
Cuirass: add support for multiple inputs

Previous Next

Package: guix-patches;

Reported by: Clément Lassieur <clement <at> lassieur.org>

Date: Tue, 10 Jul 2018 22:59:02 UTC

Severity: normal

Done: Clément Lassieur <clement <at> lassieur.org>

Bug is archived. No further changes may be made.

Full log


Message #59 received at 32121 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Clément Lassieur <clement <at> lassieur.org>
Cc: 32121 <at> debbugs.gnu.org
Subject: Re: [bug#32121] [PATCH 2/5] utils: Reset the Fiber dynamic
 environment in %NON-BLOCKING.
Date: Sat, 14 Jul 2018 15:45:58 +0200
Clément Lassieur <clement <at> lassieur.org> skribis:

> Ludovic Courtès <ludo <at> gnu.org> writes:
>
>> Clément Lassieur <clement <at> lassieur.org> skribis:
>>
>>> * src/cuirass/utils.scm (%non-blocking): Wrap body in PARAMETERIZE form that
>>> clears CURRENT-FIBER.
>>>
>>> So that PUT-MESSAGE doesn't try to suspend itself within CALL-WITH-NEW-THREAD.
>>> See https://lists.gnu.org/archive/html/guile-devel/2018-07/msg00009.html.
>>
>> Good catch!
>>
>>> +  (parameterize (((@@ (fibers internal) current-fiber) #f))
>>> +    (let ((channel (make-channel)))
>>
>> Instead of using @@, I think you can add an explicit:
>>
>>   #:use-module ((fibers internal) #:select (current-fiber))
>
> That doesn't work because it would select the exported variable (as '@'
> would have done), that is: the value of the parameter.  What I need is
> the parameter itself, which is hidden.
>
> See (fibers internal):
>
>   #:export ;; Low-level interface: schedulers and threads.
>
>             [...]
>
>             (current-fiber/public . current-fiber)
>   [...]
>
> (define current-fiber (make-parameter #f))
> (define (current-fiber/public)
>   "Return the current fiber, or @code{#f} if no fiber is current."
>   (current-fiber))

Oh I see.  Thanks for explaining!

Ludo’.




This bug report was last modified 7 years and 5 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.