()
| 410 | |
| 411 | #[cfg(feature = "telemetry")] |
| 412 | fn telemetry_sender() -> Option<&'static mpsc::SyncSender<TelemetryEvent>> { |
| 413 | TELEMETRY_SENDER |
| 414 | .get_or_init(|| { |
| 415 | let (tx, rx) = mpsc::sync_channel(TELEMETRY_EVENT_QUEUE_CAPACITY); |
| 416 | thread::Builder::new() |
| 417 | .name("openshell-telemetry".to_string()) |
| 418 | .spawn(move || telemetry_worker(rx)) |
| 419 | .ok() |
| 420 | .map(|_| tx) |
| 421 | }) |
| 422 | .as_ref() |
| 423 | } |
| 424 | |
| 425 | #[cfg(feature = "telemetry")] |
| 426 | fn telemetry_worker(rx: mpsc::Receiver<TelemetryEvent>) { |
no test coverage detected