Skip to content

Provide producer/consumer APIs for the C++ SkipList #6

@paulross

Description

@paulross

The C++ thread-safe SkipList could be used as producer/consumer priority queue. The producer API already exists with insert(). A consume API could be a (blocking) call to, say, pop_front() or pop_back() that simultaneously checks for a non-empty SkipList and removes and returns front/back object.

The API would be something like int pop_back(T &value). If this returns 0 there is nothing to pop and value is untouched. If this returns 1 then value is the value removed from the back. Similarly for pop_front.

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