This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v20.6
signal.wait( )

signal.wait( ) 


 

signal.wait ( {timeout} ) -> Result 
Parameter Type   Description
timeout  Real in Maximum waiting time for the signal in seconds
Result  Boolean in State of the signaled property

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 

Created: 4D v17 R4

 
ARTICLE USAGE

4D Language Reference ( 4D v20)
4D Language Reference ( 4D v20.1)
4D Language Reference ( 4D v20.2)
4D Language Reference ( 4D v20.3)
4D Language Reference ( 4D v20.4)
4D Language Reference ( 4D v20.5)
4D Language Reference ( 4D v20.6)