Firstly, Lua is single-threaded. Any event listeners which you have connected will be resumed in sequence and not in parallel.
Sort-of, anyway.
When a function listening to an event is called, a new coroutine is created for it to run it. All statements in a function will run until they yield, at which point the next function is resumed. In Lua, resuming event listeners could look like the following:
local listeners = {}
local function fire(...)
for i = 1, #listeners do
local routine = coroutine.create(listeners[i])
coroutine.resume(routine, ...)
end
end
To answer your question about whether or not it’s bad to connect multiple functions to a signal; short-answer, no. Long answer, it depends on what you’re doing. If each of those functions is connected to an event which is fired every frame, and they each perform a raycast… that’s probably not the best idea. That said, this only matters if your game is performing badly. If it’s running smoothly, don’t waste time worrying about it.