[gambit-list] output ports created with ##open-predefined not being garbage collected
Marc Feeley
feeley at iro.umontreal.ca
Sat Apr 11 09:30:30 EDT 2020
> On Apr 11, 2020, at 6:05 AM, Jörg F. Wittenberger <Joerg.Wittenberger at softeyes.net> wrote:
>
> On Fri, 10 Apr 2020 16:16:23 -0400
> Marc Feeley <feeley at iro.umontreal.ca> wrote:
>
>>> On Apr 10, 2020, at 1:59 PM, Jörg F. Wittenberger
>>> <Joerg.Wittenberger at softeyes.net> wrote:
>>>
>>> Background:
>>>
>>> Since when I'm using this ##open-predefined and have on my list to
>>> ask why this seems not to integrate into gambit's threading as good
>>> as I had hoped for.
>> ...
>> Then, when you want to wait for input to be available you can call
>> ##wait-input-port with that port. This is the definition in
>> lib/_io.scm:
>>
>> (define-prim (##wait-input-port
>> port)
>
> This is what I'm using so far.
>
>> This is fully integrated with the thread system, so it only blocks
>> the calling thread. Note also that you can use
>> input-port-timeout-set! if you want to block for a limited time.
>
> My observation (on Linux) was that ##wait-input-port did not block the
> current thread at all. Thus gambit was sitting in a tight loop until
> data arrives.
>
> Jörg
>
It should work. Can you show me a minimal version of your code?
Marc
More information about the Gambit-list
mailing list