Skip to content

Adding remaining() and capacity() methods to Sender and Receiver #71

@jcrevier

Description

@jcrevier

Hello! This crate is very neat. It would be very helpful for metrics if mpsc::Sender and mpsc::Receiver channel handles exposed a way to determine the capacity and remaining slots. The ThingBuf queue has a remaining() and a capacity() method, so it seems odd that Sender or Receiver don't. I'm open to writing up a PR to add this, but I noticed that the implementation of Sender and Receiver was a bit different than ThingBuf -- is there any reason these weren't exposed? From a quick glance it seems like they would be easy to add to Sender and Receiver by just using the len() and capacity() methods from self.inner.core.core

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions