-
Notifications
You must be signed in to change notification settings - Fork 2
_on_timeout
#on_timeout
###Establish an timeout handler.
Syntax
bstatement ;
bstatement ;
Exceptions
- None
Description
A timeout condition can only occur when blocking on the query method. When a timeout condition occurs, control is transferred unconditionally to the statement following on_timeout. This statement is typically a handler method. The timeout value is set using the timeout method. Once a timeout handler is used, it must be reestablished with the on_timeout statement to use it again. Typically, the on_timeout statement is called in the handler before returning. When a timeout condition occurs, the value of STATUS becomes "%TIMEOUT". If the handler changes the value of STATUS to a success value such as "$ACKNOWLEDGE", then upon returning from the handler query will continue waiting for the reply message, using the previously specified timeout. If the STATUS value remains as "%TIMEOUT", or is changed to any other non-success value, query will fail and return the value of STATUS.
Examples
puts "Create an example for the function 'on_timeout'" ;
Related Links
on_alarm
on_error
on_interrupt
on_message
on_death
on_pipe
on_timeout