waitDepth

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
the waitDepth
waitDepth()
Summary

Returns the number of nested wait commands(command) currently pending.

Introduced1.1
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Example
the waitDepth
if the waitDepth > 10 then beep
Values
NameTypeDescription
return

The waitDepth function returns a positive integer.

RelatedKeyword: integer
Command: wait
Glossary: handler, statement, command, return, execute
Control Structure: function
Description

Use the waitDepth function to determine how many wait commands are currently awaiting completion.

The wait with messages form of the wait command, when used in a handler, pauses that handler while allowing LiveCode to execute other handlers while waiting. The waitDepth function indicates how many such statements are currently executing--that is, how many handlers are currently paused by a wait with messages statement.

If there are no paused handlers, the waitDepth function returns 1.