Blocks this thread until its parent Script receives any of several signals.
Usage
thread:wait_for_any(signals)
Arguments
Name
Type
Description
signals
table
List of signals as string.
Returns
Name
Type
Description
signal
string
The signal which unblocked this thread. This return value is skipped if the input list of signals only contained one signal.
...
any
Additional arguments to the Script:signal call which unblocked this thread.
Examples
localscript=crystal.Script:new();script:run_thread(function(self)localsignal,fruit=self:wait_for_any({"plum_signal","cherry_signal"});print(signal);print(fruit);end);script:signal("plum_signal");-- Prints "plum_signal" and then "plum"script:signal("cherry_signal");-- Nothing happens