()
| 6 | use tokio::time::sleep; |
| 7 | |
| 8 | pub fn shared_tokio_runtime() -> Arc<Runtime> { |
| 9 | static RUNTIME: OnceLock<Arc<Runtime>> = OnceLock::new(); |
| 10 | |
| 11 | RUNTIME |
| 12 | .get_or_init(|| Arc::new(Runtime::new().expect("Failed to create shared Tokio runtime"))) |
| 13 | .clone() |
| 14 | } |
| 15 | |
| 16 | struct DebouncedJsonWriterState<T> { |
| 17 | pending: Option<T>, |