Send an event.
(&self, event: Event<'_>)
| 247 | |
| 248 | /// Send an event. |
| 249 | pub(crate) async fn send(&self, event: Event<'_>) { |
| 250 | if let Err(e) = self.send_impl(event, true).await { |
| 251 | eprintln!("Failed to write to jsonl: {e}"); |
| 252 | // Stop writing to fd but let process continue |
| 253 | // SAFETY: Propagating panics from the mutex here is intentional |
| 254 | let _ = self.inner.lock().await.take(); |
| 255 | } |
| 256 | } |
| 257 | |
| 258 | /// Send an event that can be dropped. |
| 259 | pub(crate) async fn send_lossy(&self, event: Event<'_>) { |