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

Marc Feeley feeley at iro.umontreal.ca
Sat Apr 11 15:00:49 EDT 2020


> On Apr 11, 2020, at 1:01 PM, Jörg F. Wittenberger <Joerg.Wittenberger at softeyes.net> wrote:
> 
> 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.
> 

If ##wait-input-port returns, it means (it is likely) there is something to read from the file descriptor.  You’ll have to read the file descriptor (through C or Scheme code) if you want ##wait-input-port to block again.  Otherwise it will return immediately because there is still something available on the file descriptor.

Marc





More information about the Gambit-list mailing list