FastSignal - A consistent signal library

I’m not sure why you thought I didn’t, but I do thread recycling on Immediate mode, not on Deferred because it doesn’t seem to be possible / doesn’t make sense. It also doesn’t happen in RBXScriptSignals on Deferred, but it does on Immediate.

The only thing that is different I believe from GoodSignal is how it recycles threads, I noticed the argument leak issue when first creating a coroutine before it was mencioned to you and I believe I updated my code to deal with that before, I’m not sure how you do it on GoodSignal since I haven’t really look at it for a while, but FastSignal should have some more cost when first firing and creating a thread to reuse than GoodSignal (at least when that was not patched) but should run the same way if no extra threads need to be created because a connection yielded for example.

This is one thing that I’ll never try to change for API parity, FastSignal tries to be as similar as it can, REASONABLY, to RBXScriptSignal behaviour, I wasn’t really aware of this, but things like disabling, destroying scripts is wrong enough to me to basically do anything for it to not matter to me, and I would never change my library for that much of a performance hit for the sake of something that is to me, deprecated ways of doing something.

Thread recycling has pretty big performance improvements even if its not just running the connection directly, which you can notice with a lot of connections running like you know, and while I usually am the person that would try to create completely unbiased libraries, disabling/enabling scripts is one of those things that even if a person isn’t using my library they will run into problems anyway, so I found that to honestly just not be important especially if it means losing the performance gains that Immediate has from thread recycling. (Which seems to be one of the biggest issues for people moving to Deferred when they relied on how Immediate performance logic worked)

I don’t plan on maintaining this anymore, not actively anymore anyway. I am out of the development scene at least here, and unfortunately do not have proper access to Roblox anymore due to Linux/Wine being blocked.

PRs are still welcome! I am able to check out Studio and stuff, just not Player. If anyone wants to implement the better typing introduced by another Signal class out there that I don’t remember the name then go for it. If anyone wants to fork and start their own, go for it, I might advertise it here.

Is there any way to get a connection from another script?
Let’s say

--First script
local Signal = Signal.new()
Signal:Wait()
--Second script
local Signal = Signal.get(--The signal from the previous script)
Signal:Fire()

Use module scripts.

LocalScript.luau

...

local ModuleWithSignal = require(path.to.module)

ModuleWIthSignal.Signal:Connect(function()
    ...
end)

...

ModuleScript.luau

...
local module = {}
module.Signal = Signal.new()
...

return module

Yeah I made my own “get” function in like 2 minutes after posting, now I feel kinda dumb for asking that but thank you!

1 Like

I’m finally able to use Player on Linux due to Sober. So, who knows.

A few updates were launched. Generic types has a beta implementation…

I recommend also checking out LemonSignal.
They’ve implemented the double sided linked list also used in FastSignal for better disconnecting.

Important after the fact note: LemonSignal does not seem to support Deferred, therefore it isn’t as future-proof. Beware. Ideally you want to start moving your games to use Deferred behaviour and FastSignal can help you with that with its adapted mode.

1 Like

I have made a library that can not only replace fastsignal but also remotes: FastValue A replacement for the Value Instances

What script editor is that? It seems really useful… or is that the plugin you’re using?

That is Visual Studio Code, the most used external IDE on Roblox! VS Code is wildly popular among professional programmers outside Roblox, and if you pursue a programming (CS) career, it’s really helpful to be familiar with how the editor and Git works - definitely worth a shot!

If you’re interested, here’s a guide:

VSCodium is nice too; at that time yes, I was using VSCode, now a days I use Fedora Linux with VSCodium firejailed, but it’s mostly for simple PRs.
In that screenshot, I definitely used a bunch of themes, now a days I have no idea what those are though.

Also, FastSignal is used by DataKeep! (very nice, I like this library)

Edit: oh wow. actually, it’s being used by a bunch of other libraries :smiley:

thanks everyone :P

Hello, I recommend putting the main thing that FastSignal does in the top of your topic, because some people including me don’t know what GoodSignal may be.

1 Like

I went over and overwrote the 10.3.2 tag in Git, this time signed by my SSH key. This should give some more security in case GitHub does anything weird; I should mirror this to Codeberg… that’s why you’ll see maybe mismatched dates of when that ‘release’ was launched. The latest code commits are signed by an older key, not trusted anymore; but this should give some security in the case of authenticity for the time being