The value of this variable affects the frequency with which the program's threads change control based on file IO activity. After a thread performs the value of IO_SWITCH_PERIOD operations, the runtime switches control to another thread (if one exists). Note that because thread switching is also affected by other program operations (such as display I/O), it is impossible to predict or absolutely control when a thread will change control.

The default value of IO_SWITCH_PERIOD is 10. This value will provide good results with most applications. To produce behavior that more closely imitates that of Versions 6.1 and earlier, set IO_SWITCH_PERIOD to 1. Zero and negative values are invalid and will result in undefined behavior.