1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-09-02 17:46:38 +02:00

pool doc nits (#1999)

This commit is contained in:
Rob Ede
2021-02-16 09:08:30 +00:00
committed by GitHub
parent c065729468
commit 17b3e7e225
4 changed files with 80 additions and 71 deletions

View File

@@ -26,9 +26,10 @@ pub(crate) enum ConnectionType<Io> {
H2(H2Connection),
}
// h2 connection has two parts: SendRequest and Connection.
// Connection is spawned as async task on runtime and H2Connection would hold a handle for
// this task. So it can wake up and quit the task when SendRequest is dropped.
/// `H2Connection` has two parts: `SendRequest` and `Connection`.
///
/// `Connection` is spawned as an async task on runtime and `H2Connection` holds a handle for
/// this task. Therefore, it can wake up and quit the task when SendRequest is dropped.
pub(crate) struct H2Connection {
handle: JoinHandle<()>,
sender: SendRequest<Bytes>,