Timeout Option

The timeout option, if present, specifies the amount of time the caller can wait if the interlock cannot be acquired immediately. The timeout is specified in seconds, and a value less than zero indicates that the program can wait indefinitely. If no timeout is specified, a timeout of 1 is assumed. If the timeout is 0 (zero), the lock succeeds only if the interlock is FREE.