rust-lang / futures-rs

Zero-cost asynchronous programming in Rust
https://rust-lang.github.io/futures-rs/
Apache License 2.0
5.34k stars 616 forks source link

Add `num_messages` method for `UnboundedSender` #2749

Closed thement closed 1 year ago

thement commented 1 year ago

Add method to inspect how many messages are enqueued in the message queue.

taiki-e commented 1 year ago

Thanks for the PR. I think such a method would usually be called len. (e.g., crossbeam)

Also, please submit PR to master, not 0.3, except for barkports.

thement commented 1 year ago

Sorry! I'll redo the PR.