fn send_command(
command: InternalCommand,
tx_to_thread_opt: Option<&mut AquaSender<InternalCommand>>,
rx_from_thread_opt: Option<&mut AquaReceiver<bool>>,
thread_name: &str,
)Expand description
Sends a specified InternalCommand to a target thread’s channel and optionally waits for an acknowledgment.
The signal handler uses this helper function to communicate termination or other control commands to various application threads. It attempts to send the command and, if a receiver channel is provided, waits for a boolean acknowledgment to confirm the command was processed.
§Arguments
command- TheInternalCommandto be sent to the target thread.tx_to_thread_opt- AnOptioncontaining the sender part of the channel for communication to the target thread. IfNone, no command is sent.rx_from_thread_opt- AnOptioncontaining the receiver part of the channel for communication from the target thread, used to receive an acknowledgment. IfNone, no acknowledgment is expected or waited for.thread_name- The name of the target thread (for logging and debugging purposes).