4D v19

signal.wait( )

Home

 
4D v19
signal.wait( )

signal.wait( )  


 

The signal.wait( ) method makes the current process wait until the "signaled" property of the signal object to become true or the optional timeout to expire.

Note: For more information on the signal object, please refer to the New signal command.

To prevent blocking code, you can pass a maximum waiting time in seconds in the timeout parameter (decimals are accepted). 

Warning: Calling signal.wait( ) without a timeout in the 4D main process is not recommended because it could freeze the whole 4D application.

If the signal is already in the signaled state (i.e. the "signaled" property is already true), the method returns immediately, without waiting.

The method returns the value of the "signaled" property. Evaluating this value allows knowing if the method returned because the signal.trigger( ) has been called ("signaled" is true) or if the timeout expired ("signaled" is false).

Note: The state of a process that waits for a signal is Waiting for internal flag.

Example  

See example for the New signal command.



See also 

New signal
signal.trigger( )

 
PROPERTIES 

Product: 4D
Theme: Process (Communications)

This command can be run in preemptive processes

 
PAGE CONTENTS 
 
HISTORY 

 
ARTICLE USAGE

4D Language Reference ( 4D v19)
4D Language Reference ( 4D v19.1)