-
Notifications
You must be signed in to change notification settings - Fork 103
Open
Description
Operations on the mock queues are usually done through the load
and store
methods of Ref
. While this was initially convenient, it makes harder to implement checks or conversions (such as endianess transformations) for certain fields. It's also less readable, as the developer needs to identify what's being read or written by its location in the ring.
I see two options to improve this:
- Avoid returning
Ref
andArrayRef
fromSplitQueueRing
, implementing instead methods with concrete types for each data field being accessed. - Avoid the use of primitive types in tests, always wrapping them in structs with descriptive names and accessor methods.
Option (1) sounds more reasonable to me, but I don't have an strong opinion about them.
andreeaflorescu
Metadata
Metadata
Assignees
Labels
No labels