Skip to content

Commit a9f905e

Browse files
tokio does not detect deadlocks
1 parent 234ae3e commit a9f905e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/behavior-not-considered-unsafe.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ task2.join();
5050
# }
5151
```
5252

53-
In general, determining whether a program has deadlocked requires to solve the [Halting problem], which is impossible. Even though many instances of deadlocks can be detected automatically, doing so is not always practical. Regardless, many multitasking systems, and especially async frameworks such as [tokio], provide good deadlock detection capabilities.
53+
In general, determining whether a program has deadlocked requires to solve the [Halting problem], which is impossible. Even though many instances of deadlocks can be detected automatically, doing so is not always practical. Regardless, some multitasking systems provide good deadlock detection capabilities.
5454

5555
r[not-unsafe.livelocks]
5656
Livelocks are a related issue where no real progress is made in a group of tasks, yet they technically continue to run. For instance, using non-blocking synchronization primitives like spinlocks or atomic variables can quickly lead to livelocks. This is in opposition to deadlocks, where tasks are blocked on resource acquisition, which is relatively easy to discern. Therefore, livelocks are much harder to detect than deadlocks, but equally undesirable.
@@ -152,6 +152,5 @@ Safe code may impose extra logical constraints that can be checked at neither co
152152
[debug_assertions]: cfg.debug_assertions
153153
[integer types]: type.numeric.int
154154
[Halting problem]: https://en.wikipedia.org/wiki/Halting_problem
155-
[tokio]: https://tokio.rs/
156155
[Address space layout randomization]: https://en.wikipedia.org/wiki/Address_space_layout_randomization
157156
[function pointer]: type.fn-pointer

0 commit comments

Comments
 (0)