[gambit-list] output ports created with ##open-predefined not being garbage collected

Jörg F. Wittenberger Joerg.Wittenberger at softeyes.net
Sat Apr 11 06:05:37 EDT 2020


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




More information about the Gambit-list mailing list