Skip to content

Implement Deferred/Adapted Signal using Lua #463

Description

@lucasmz-dev

What package is this for?
Signal

Describe your problem
Currently, Signal by defaults uses GoodSignal which has some issues but is nice, but it also has the option of the older standard that uses BindableEvents. BindableEvents allow for Deferred (Adaptive) behavior which is important, GoodSignal doesn't. At the same time however, BindableEvents suck. They cause memory leaks which may not be detected by the user.

Describe the solution you'd like

We should abandon the BindableEvent approach. It is slower, leakier, just plain worse. We now have the power of Lua Signals, have had so for a long time. But it is also important to implement Deferred behavior.

We have task.defer, and it is also possible to infer what mode the game is in with some simple code.
I did this in my Signal library which is useful to implementing this. You can use it if you like (I don't maintain it, running Linux can't anymore, it doesn't have the same typing as sleitnick's fork for example) or fork/use the ideas/code from there. (I think so anyway? I haven't looked at licenses for a while but I can probably change it for this if it is an issue)

Thank you for your time.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions