Mikael More wrote:
So this is it, a mechanism that waits for external fd:s? I.e. it adds an external fd to Gambit's select() call in the Scheduler,
No, this is just the functionality that waits for input or output on a port without actually reading from it or writing to it. If you've got an fd from your library, you need the |fd->port| first.
and then returns when there's data (or one can write)?
Yes, if there is no timeout set then those block until input is there or the OS output buffer can take output. If a timeout is set, they return with #f instead of with #t, as it seems.
So for X external fd:s, one spawns X threads and calls port-wait-for-input with the port as parameter, and the port in turn is the result of fd->port?
Yes, you usually want one Gambit thread per port / fd.
Christian.