Skip to content

Commit

Permalink
listen -> wait_for_all_handle_drops
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickfreed committed Oct 19, 2020
1 parent 54c5866 commit dbe3ad5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cmap/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ impl ConnectionPoolWorker {
Some(result_sender) = self.request_receiver.recv(),
if self.can_service_connection_request() => PoolTask::CheckOut(result_sender),
Some(request) = self.management_receiver.recv() => request.into(),
_ = self.handle_listener.listen() => {
_ = self.handle_listener.wait_for_all_handle_drops() => {
// all worker handles have been dropped meaning this
// pool has no more references and can be dropped itself.
break
Expand Down Expand Up @@ -511,7 +511,7 @@ impl HandleListener {
/// Listen until all handles are dropped.
/// This will not return until all handles are dropped, so make sure to only poll this via
/// select or with a timeout.
async fn listen(&mut self) {
async fn wait_for_all_handle_drops(&mut self) {
self.receiver.recv().await;
}
}

0 comments on commit dbe3ad5

Please sign in to comment.