@@ -217,7 +217,7 @@ done using "wrap" counters:
217217 the inverse. When the device publishes a used descriptor, it sets both ` AVAIL ` and ` USED ` to its
218218 wrap bit.
219219- The reader of a descriptor then compares the flags it reads to its own current wrap to decide if
220- the descriptr is newly available/used now, or is it lagging behind.
220+ the descriptor is newly available/used now, or is it lagging behind.
221221
222222### Comparison with current implementation
223223
@@ -231,7 +231,7 @@ Each of these memory regions begins with an 8-byte header that stores a relative
231231the next free byte in the stack.
232232
233233When pushing, the payload which is flatbuffer-serialized message is written at the current stack
234- pointer, followed by the 8-byte footer that containins just written payload's starting offset.
234+ pointer, followed by the 8-byte footer that containing just written payload's starting offset.
235235Finally, the header is advanced to point past the footer. This makes each item a pair of
236236` payload + back-pointer ` , so the top of the stack can always be found in O(1) without extra
237237metadata.
@@ -280,7 +280,7 @@ different batching strategies. For example:
280280** 2. Event based notifications**
281281
282282In the single threaded application the notification involve VM exit but in multi-thread environment
283- where host and guest are running in separate threads we can laverage event-based notifications (for
283+ where host and guest are running in separate threads we can leverage event-based notifications (for
284284example ` ioeventfd ` for kvm). This is especially useful for streaming scenarios where the guest can
285285continue processing while the host consumes data asynchronously.
286286
@@ -324,7 +324,7 @@ struct Descriptor {
324324
325325When the ` INLINE ` flag is set, the ` addr ` is unused. This optimization, inspired by io_uring,
326326eliminates memory indirection for common small messages, improving both latency and cache behavior.
327- The tradeof is the increased size of descriptor table. Alternatively we could repurpose the ` addr `
327+ The tradeoff is the increased size of descriptor table. Alternatively we could repurpose the ` addr `
328328and ` len ` as raw bytes providing 12 bytes of inline storage. We should asses if any of flatbuffer
329329schema serialized data can actually fit into small inline data.
330330
@@ -657,7 +657,9 @@ where
657657 N : NotificationStrategy ,
658658{
659659 /// Split into separate sender and receiver
660- pub fn split (self ) -> (RingSender <A , N >, RingReceiver );
660+ pub fn split (self ) -> (RingSender <A , N >, RingReceiver ) {
661+ unimplemented! (" split is not implemented in this example" );
662+ }
661663}
662664
663665impl <A , N > RingSender <A , N >
@@ -671,7 +673,7 @@ where
671673 T : FlatbufferSerializable ;
672674
673675 /// Try to send without blocking
674- pub fn try_send <T >(& mut self , message : T ) -> Result <Token , RingError >;
676+ pub fn try_send <T >(& mut self , message : T ) -> Result <Token , RingError >
675677 where
676678 T : FlatbufferSerializable ;
677679}
0 commit comments