Skip to content

Generic Queue abstraction #56

@schets

Description

@schets

Would a generalized version of the Queue abstraction in bench.rs would be a good idea - maybe one based on producers/consumers? This would make defining functions which generically operate on a queue type easier and standardized. To take it further, a set of traits based on (mp/sp) + (sc/mc) and maybe other properties would make the queue type needed by a function self documenting and give better error messages when the wrong queue type was passed - for instance, the error is on a spsc queue with too many consumers is:

the trait core::marker::Sync is not implemented for the type *mut i64

with SpscBufferQueue mentioned briefly in the explanation. In a large codebase, I would probably have little idea what was going on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions