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