Skip to content

Feature request: force-push #18

@jakalope

Description

@jakalope

In low-latency applications, it's often desirable to drop old items from the queue in favor of newer items. A suitable interface might be something like:

fn force_push(&self, v: T) -> option<T>

where the return value is None or, if the oldest element was dropped, Some(old_value).

Such a function would be non-blocking, of course.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions