The project is undergoing rework and will be presented on another topic
Cool Signal
LOOK FOR THE NEW VERSIONS HERE
CoolSignal | Fast and Supports ConnectParallel , Efficient and Concise - Resources / Community >Resources - Developer Forum | Roblox
How to Download it ?
Get it NOW From
Marketplace Store | Releases | GithubFILE LINK | Signal V2.5.5 (9.3 KB)
(PLEASE DOWNLOAD VERSION BEFORE V2.5.5, V2.5.5 IS UNSTABLE , Currently it has known memory bugs and over-closures)
CURRENT VERSION : Version 2.5.5
Report Bugs here and you can ask some questions if you dont understand
Features:
- Supports one-way communication
- Supports Auto-complete
- Support for cross-actors
- Use OOP to Simulate the
RBXScriptSignalstyle - Available in
DisconnnectAllandDestroyMethods - Defensive programming (Strict Typing-check)
- Direct support for
WaitandOnceinstead of helping withConnect - No memory leaks (BASED ON LUAU LINKED LIST)
- Good efficiency and very Fast
600 lines of code are annotated and readable- It can be EMBEDDED
- BindableEvents are not created in multiple Actors (only need your actor!)
APIs:
- Signal (enableParallel [boolean], uniqueName [string) – uniqueName is for Parallel Luau when enable Parallel
- Signal:Connect(func [function]) – Listen to the signal , allowed multi-callbacks
- Signal:ConnectParallel(script [Your script], func [function]) – Listen to the signal in parallel , allowed multi-callbacks
- Signal:Once(func [function]) – Only Listen to the signal once and disconnect
- Signal:Wait() – Yield the thread until the signal is fired
- Signal:Fire(…) – Fire the signal and all callbacks will be called
- Signal:FireDeferred(…) – Fire the signal and call task.defer()
- Signal:DisconnectAll() – Disconnect all connections
- Signal:Destroy() – Destroy current object
- Signal.isEmpty: () → boolean, – Get isEmpty
- Signal.isEmptyParallel: () → boolean, – Get isEmptyParallel
- Signal.EnabledParallel: () → boolean, – Get enabledParallel
- Signal.GetListenersCounter: () → number, – Get Counter
- Signal.GetListenersCounterParallel: () → number, – Get Counter
- SignalConnection.Connected: () → boolean, – Get connection status
- SignalConnection:Disconnect() – Disconnect current connection
Why do we use it?
we can use it to help communicate between our modules
How to use it?
-- require my module
local Signal = require("./Signal")
-- new a singal Instance
local signalInstance = Signal()
-- now we can enjoy using it
-- If Running On Parallel Luau
--local signalInstance = Signal(true, --[[Your Signal Name]])
-- And you can use ConnectParallel and FireParallel Now
local signalInstanceParallel = Signal(true, "hello")
-- Actor 1
signalInstanceParallel:ConnectParallel(function(a)
print(a)
end)
-- Actor 2
task.defer(function()
signalInstanceParallel:Fire("handle")
end)
Benchmarking (Version 2.5.0)
--------Function----------------------------Time--------------------
| Create | 1.4 μs |
| Fire | 0.51 μs |
| Once | 0.5 μs |
| Wait | 3.23 μs |
| Connect | 0.7 μs |
| Disconnect | 0.15 μs |
| DisconnectAll |o(n)*0.2 μs |
| ConnectParallel | 5 ms |
| ConnectAndDisconnect | 5 μs |
| FireManyArgs | 41 μs (1000 args) |
| ConnectMany | 385 μs (1000 connections) |
| FireAndConnectionMany| 1006.67 μs (1000 connections & Fired 1000)|
--------------------------------------------------------------------
Enjoy this
This signal module uses MIT open source license
You can modify its copy and Choose whether to open source or not

