NSCL

fselect - Tcl extension to support Unix select(2)

 

The Select tcl/tk loadable package allows access to the Unix select(2) functionality from within Tcl/Tk  scripts.   To use this package you must issue the command:

package require Select

from within a tcl/tk script or at the tcl/tk shell command line.  This makes available the following command:

fselect
Usage:
  fselect ?-timeout nmsec? readfds writefds
     -timeout nmsec : Timeout in milliseconds
     readfds        : TCL List of TCL channels you want to
                      wait to become readable
     writefds       : TCL List of TCL channels you want to
                      wait to become writeable

If the optional timeout parameter is omitted, then the fselect blocks until at least one channel becomes available.  Timeout values of 0ms are allowed and represent a poll on the current state of the fds.

The command returns a two element list.  The first element is a (possibly empty) sublist containing all the readable fds.  The second element is a possibly empty sublist containing all the writable fds.

 


April 23, 2001Fox@nscl.msu.edu
NSCL Computer Group