summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorStefan Lankes <slankes@eonerc.rwth-aachen.de>2020-06-15 09:29:32 +0200
committerStefan Lankes <slankes@eonerc.rwth-aachen.de>2020-06-15 09:29:32 +0200
commita8e3746e9160b8a433c95df7114e5760592a62e8 (patch)
tree866cb828ff7bc72bc5a8bce5da45f473a50d4230 /src/libstd
parent6c983a733550ff37cb603f409901f3b3d0eaa8c2 (diff)
downloadrust-a8e3746e9160b8a433c95df7114e5760592a62e8.tar.gz
rust-a8e3746e9160b8a433c95df7114e5760592a62e8.zip
add comment about the usage of Arc
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/sys/hermit/net.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstd/sys/hermit/net.rs b/src/libstd/sys/hermit/net.rs
index 6410dec756d..9146dfc55f4 100644
--- a/src/libstd/sys/hermit/net.rs
+++ b/src/libstd/sys/hermit/net.rs
@@ -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>);