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

Jörg F. Wittenberger Joerg.Wittenberger at softeyes.net
Sat Apr 11 13:01:10 EDT 2020


On Sat, 11 Apr 2020 09:30:30 -0400
Marc Feeley <feeley at iro.umontreal.ca> wrote:

> > 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.
> ...
> It should work.  Can you show me a minimal version of your code?

I shall destill.  (Too much praise actually: gamsock is not really "my
code".)

Though while walking the dog it occured to me that the gamsock code
reads the data directly from the file descriptor using recvfrom(2).

It could have easily escaped me that the first attempt to
##wait-input-port did actually block.  If there was the need to reset
the port state (or go to the trouble to figure out how to change the
heritage to read via gambit -- whatever is simpler) in order to inform
the threading system that it should actually check the file descriptor
again, then maybe we can shortcut the session.

Best

/Jörg




More information about the Gambit-list mailing list