Skip to content

Commit

Permalink
add comment about the usage of Arc
Browse files Browse the repository at this point in the history
  • Loading branch information
stlankes committed Jun 15, 2020
1 parent 6c983a7 commit a8e3746
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libstd/sys/hermit/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ impl Drop for Socket {
}
}

// Arc is used to count the number of used sockets.
// Only if all sockets are released, the drop
// method will close the socket.
#[derive(Clone)]
pub struct TcpStream(Arc<Socket>);

Expand Down

0 comments on commit a8e3746

Please sign in to comment.