Skip to content

Commit b22bdf7

Browse files
committed
clarify comment about burden
1 parent c82d020 commit b22bdf7

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

text/0000-poll-drop-ready.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,15 @@ In non-async contexts, no change is made to destructors. This means that users
180180
writing low level primitives which may want to run async destructor code on
181181
values they are destroying (such as inside the poll method of a
182182
manually-implemented future) will need to call `mem::poll_drop_ready`
183-
themselves, or this code will be skipped. **Only users dropping values inside of
184-
poll methods need to take special care to ensure async destructors run.**
183+
themselves, or this code will be skipped.
184+
185+
Therefore, there are two cases in which users will have to take special care to
186+
ensure that async destructors are called:
187+
188+
1. If they would already have to call `drop_in_place` to ensure that normal
189+
destructors are called (as in data structures like `Vec`).
190+
2. If they are dropping a value that may have an async destructor inside an
191+
async context.
185192

186193
## Drop glue in `mem::poll_drop_ready`
187194

0 commit comments

Comments
 (0)