Skip to content

Commit d358147

Browse files
committed
Clearify doc of poll.
1 parent 03a630f commit d358147

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/driver/mod.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,19 @@ pub trait Poller {
8989
fn post(&self, user_data: usize, result: usize) -> io::Result<()>;
9090

9191
/// Poll the driver with an optional timeout.
92-
/// If no timeout specified, the call will block.
92+
///
93+
/// If there are already tasks completed, this method will return immediately.
94+
///
95+
/// If there are no tasks completed, this call will block and wait.
96+
/// If no timeout specified, it will block forever.
97+
/// To interrupt the blocking, see [`Poller::post`].
9398
fn poll(
9499
&self,
95100
timeout: Option<Duration>,
96101
entries: &mut [MaybeUninit<Entry>],
97102
) -> io::Result<usize>;
98103

99104
/// Poll the driver and get only one entry back.
100-
/// If no timeout specified, the call will block.
101105
///
102106
/// See [`Poller::poll`].
103107
fn poll_one(&self, timeout: Option<Duration>) -> io::Result<Entry> {

0 commit comments

Comments
 (0)