Releases: RBLXUtils/FastSignal
Native implementation
This update removes any use of BindableEvents, making it faster, cooler, and epic.
While I call it an update, I consider this as a second version of the one that uses BindableEvents.
The Roblox model points to the native implementation, however GitHub will always have main as BindableEvents, as least for now.
I haven't been able to get :ConnectParallel to work on this, I suppose it's no big deal, so I'll probably remove it for now.
What does this mean?
Not having any references to a Signal / any active connections means that the entire event and all connections are cleaned up with no issue.
BindableEvents are instances, and there's no such thing as "there's no more references so clean it" with Instances.
Also means it can be 2x faster, compared to my BindableEvent implementation it can be probably 3x faster.
I recommend switching over to the native implementation.
:IsActive readded + Improvements
I might have um... forgotten to add :IsActive. Anyway it's back.
This is a small release, you don't need to update it unless you're using :IsActive.
- Now, inside the Signal library, you'll find a
FAST_MODEvariable. Read the library to understand what it is. :IsActivere-added.:ConnectParallelwhile being not as efficient as the pure function, now works pretty much safely.- Improvements to memory use
Basically a rewrite, but changes only some things for users.
I didn't think I would have to re-do this library AGAIN, I did that SO MANY TIMES AT THIS POINT it's CRAZY.
Anyway, I checked out Quenty's signal library and it gave me some new info which REALLY helps.
Mine is slightly more optimized and better handled than his now, because I don't have the debug things he has.
Anyhow, now I'm pretty sure now you can use :ConnectParallel just fine with no issue which I couldn't really confirm before if it was fine.
Anyway, the big change here is that now arguments clean up, and in the easiest way possible which is great.
This library MIGHT face another rewrite MAYBE when we get task.defer but not sure. We'll see. Let's just hope we can stay on one single version.
:Fire is slower just like when I first introduced this library with bindables instead of arrays, which is because I'm using :GenerateGUID() after I got pointed out that there can be issues with race conditions with the incremental value, so this is slower but we won't have any issues.
Deferred Events "support"
- It uses a bit more memory, that's because I can NOT clean up arguments after firing, as :Fire will only actually fire connections after no code is being ran.
This means that... the arguments are only cleaned up on :Destroy!
One thing is that if a connection fires after a destroy happens, that connection will be fired with no arguments.
Firing with no arguments doesn't use extra memory.
Stable-ity update
Changes:
- Fixed issue where firing with a nil argument as the last argument would remove the nil argument, therefore printing would not show it.
- Added documentation (better than GitHub's) inside the module.
- You can now give a Signal a specific name, by either setting
.Name, or by giving it as the first argument ofSignal.new! - ^ This means when you print it, it will now be similar to actually printing an actual Signal.
- Now gives warnings when you try to use a method on a destroyed Signal.
Notes:
.Activeis not a property anymore, use:IsActiveinstead, actually changed a while ago.:ConnectParallelis now available as a beta.
Slight rewrite, nothing special
2.5.5 - no longer deepcopies
fixed deep copying in bindables
Now using BindableEvents
Yeah so now you can use :ConnectParallel(), not that that wasn't possible otherwise, but yeah.
It fixes the issues Ukendio showed off.
Rewrite, faster than ever.
Cool! Very epic, infact.