Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

why does createSignal not use the task library? #371

Open
nuttolum opened this issue Jun 9, 2022 · 1 comment
Open

why does createSignal not use the task library? #371

nuttolum opened this issue Jun 9, 2022 · 1 comment

Comments

@nuttolum
Copy link

nuttolum commented Jun 9, 2022

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
@ghost
Copy link

ghost commented Jul 22, 2022

Callbacks aren't allowed to yield

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant