From c64281fbd493791091668ad5ee11bd9b954d3d6e Mon Sep 17 00:00:00 2001 From: Yilin Chen Date: Mon, 5 Aug 2019 20:44:45 +0800 Subject: [PATCH] Refine some docs Signed-off-by: Yilin Chen --- src/rpc/pd/timestamp.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/rpc/pd/timestamp.rs b/src/rpc/pd/timestamp.rs index 2b38392..ee44499 100644 --- a/src/rpc/pd/timestamp.rs +++ b/src/rpc/pd/timestamp.rs @@ -6,10 +6,10 @@ //! Once a `TimestampOracle` is created, there will be two futures running in a background working //! thread created automatically. The `get_timestamp` method creates a oneshot channel whose //! transmitter is served as a `TimestampRequest`. `TimestampRequest`s are sent to the working -//! thread through a bounded multi-producer, single-consumer channel. The first future tries to -//! exhaust the channel to get as many requests as possible and sends a single `TsoRequest` to the -//! PD server. The other future receives `TsoResponse`s from the PD server and allocates timestamps -//! for the requests. +//! thread through a bounded multi-producer, single-consumer channel. Every time the first future +//! is polled, it tries to exhaust the channel to get as many requests as possible and sends a +//! single `TsoRequest` to the PD server. The other future receives `TsoResponse`s from the PD +//! server and allocates timestamps for the requests. use super::Timestamp; use crate::{Error, Result}; @@ -23,7 +23,7 @@ use futures::{ task::{AtomicWaker, Context, Poll}, }; use grpcio::WriteFlags; -use kvproto::pdpb::{PdClient, *}; +use kvproto::pdpb::*; use std::{cell::RefCell, collections::VecDeque, pin::Pin, rc::Rc, thread}; /// It is an empirical value.