MCPcopy Create free account
hub / github.com/aws/clock-bound / receiver_drop

Function receiver_drop

clock-bound/src/daemon/async_ring_buffer.rs:337–344  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

335
336 #[tokio::test]
337 async fn receiver_drop() {
338 let (tx, rx) = create::<i32>(2);
339 drop(rx);
340
341 assert!(tx.is_closed());
342 // Should receive BufferClosedError when trying to send after receiver is dropped
343 assert!(tx.send(1).is_err());
344 }
345
346 #[tokio::test]
347 async fn empty_buffer() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected