Skip to content

Improvements in Waitable Queue #31

Description

@sgn4sangar

The waitable_queue.hpp has a bit of scope to improve

  1. It is better not to expose the underlying queue through following queue functions
    Queue& queue() noexcept { return queue_; } const Queue& queue() const noexcept { return queue_; }

  2. As of now the epoll system calls and the queue adapter APIs can be accessed independently
    Eg: try_dequeue(Output& value) removes an item but does not drain the eventfd. If a consumer calls try_dequeue() without first calling drain_notifications().., epoll_wait() may continue reporting the queue fd has still data.
    The order of calling the functions shall be, somehow, enforced appropriately; like epoll_wait() followed by drain_notifications() and dequeue

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactoringCode improvement without behavior change

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions