Commit 3dd36d3
committed
review: reference
NB: this commit means that this branch (tokio-rs#7153) is dependent upon
interfaces proposed in (tokio-rs#7152).
pr tokio-rs#7152 proposes a `is_terminated()` method for the oneshot channel's
receiver. that is the proper method to use to check whether or not it is
safe to poll a oneshot receiver as a future.
this commit adds a note cross-referencing this method to the
documentation of `is_empty()`, to help mitigate misuse. this method only
reports whether a value is currently waiting in the channel; a channel
that has already received and yielded a value to its receiver is also
empty, but would panic when polled.
Signed-off-by: katelyn martin <[email protected]>is_terminated() in documentation1 parent b7a0070 commit 3dd36d3
1 file changed
+25
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
996 | 996 | | |
997 | 997 | | |
998 | 998 | | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
999 | 1003 | | |
1000 | 1004 | | |
| 1005 | + | |
| 1006 | + | |
1001 | 1007 | | |
1002 | 1008 | | |
1003 | 1009 | | |
| |||
1013 | 1019 | | |
1014 | 1020 | | |
1015 | 1021 | | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
1016 | 1041 | | |
1017 | 1042 | | |
1018 | 1043 | | |
| |||
0 commit comments