An apparatus, program product and method of handling tasks that are
sleeping and waiting for the completion of I/O operations of other tasks
comprises determining a second task which is to await the completion of
the I/O operations of a first task, and putting the second task to sleep.
A timer is created and associated with the second task. The timer expires
when a predetermined wait interval is exceeded. When the timer expires,
the sleeping second task is awoken so that a sleeping task is generally
prevented from waiting indefinitely for the I/O operations of another
task.