roact icon indicating copy to clipboard operation
roact copied to clipboard

why does createSignal not use the task library?

Open nuttolum opened this issue 3 years ago • 1 comments

the createSignal file has the following code:

for callback, connection in pairs(connections) do
        if not connection.disconnected and not suspendedConnections[callback] then
                callback(...)
        end
end

why is this not done differently? I would do it like this:

for callback, connection in pairs(connections) do
        if not connection.disconnected and not suspendedConnections[callback] then
                task.spawn(callback, ...)
        end
end

nuttolum avatar Jun 09 '22 19:06 nuttolum

Callbacks aren't allowed to yield

ghost avatar Jul 22 '22 08:07 ghost