Class: SynSignal
Static Methods
SynSignal SynSignal.new()
Creates a new SynSignal that can be called with :Fire()
.
Methods
SynConnection SynSignal:Connect(f: function)
Connects a listener to this signal. Errors if called on a Lua state different to the one used to create this signal.
any SynSignal:Wait() [yields]
Yields the current thread until the next time this signal is fired. Returns any invocation parameters. Errors if called on a Lua state different to the one used to create this signal.
void SynSignal:Fire(...any)
Fires this signal. Only usable when this signal is created via SynSignal.new()
. Equivalent behavior exists via the __call
metamethod; i.e. instead of sig:Fire(1, 2, 3)
you can also do sig(1, 2, 3)
.