![]() |
WPILibC++ 2025.3.2
|
Namespaces | |
| namespace | detail |
| namespace | trait |
Classes | |
| class | Connection |
| A Connection object allows interaction with an ongoing slot connection. More... | |
| class | ConnectionBlocker |
| ConnectionBlocker is a RAII object that blocks a connection until destruction. More... | |
| class | ScopedConnection |
| ScopedConnection is a RAII version of Connection It disconnects the slot from the signal upon destruction. More... | |
| class | SignalBase |
| SignalBase is an implementation of the observer pattern, through the use of an emitting object and slots that are connected to the signal and called with supplied arguments when a signal is emitted. More... | |
Typedefs | |
| template<typename... T> | |
| using | Signal = SignalBase<detail::NullMutex, T...> |
| Specialization of SignalBase to be used in single threaded contexts. | |
| template<typename... T> | |
| using | Signal_mt = SignalBase<mutex, T...> |
| Specialization of SignalBase to be used in multi-threaded contexts. | |
| template<typename... T> | |
| using | Signal_r = SignalBase<recursive_mutex, T...> |
| Specialization of SignalBase to be used in multi-threaded contexts, allowing for recursive signal emission and emission cycles. | |
| using wpi::sig::Signal = SignalBase<detail::NullMutex, T...> |
Specialization of SignalBase to be used in single threaded contexts.
Slot connection, disconnection and signal emission are not thread-safe. This is significantly smaller than the thread-safe variant.
| using wpi::sig::Signal_mt = SignalBase<mutex, T...> |
Specialization of SignalBase to be used in multi-threaded contexts.
Slot connection, disconnection and signal emission are thread-safe.
Beware of accidentally using recursive signal emission or cycles between two or more signals in your code. Locking std::mutex more than once is undefined behavior, even if it "seems to work somehow". Use signal_r instead for that use case.
| using wpi::sig::Signal_r = SignalBase<recursive_mutex, T...> |
Specialization of SignalBase to be used in multi-threaded contexts, allowing for recursive signal emission and emission cycles.
Slot connection, disconnection and signal emission are thread-safe.