nushell/crates/nu_plugin_stress_internals
Devyn Cairns c52884b3c8
Fix (and test) for a deadlock that can happen while waiting for protocol info (#12633)
# Description

The local socket PR introduced a `Waitable` type, which could either
hold a value or be waited on until a value is available. Unlike a
channel, it would always return that value once set.

However, one issue with this design was that there was no way to detect
whether a value would ever be written. This splits the writer into a
different type `WaitableMut`, so that when it is dropped, waiting
threads can fail (because they'll never get a value).

# Tests + Formatting

A test has been added to `stress_internals` to make sure this fails in
the right way.

- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`
2024-04-24 08:44:04 -05:00
..
src Fix (and test) for a deadlock that can happen while waiting for protocol info (#12633) 2024-04-24 08:44:04 -05:00
Cargo.toml Local socket mode and foreground terminal control for plugins (#12448) 2024-04-15 18:28:18 +00:00
LICENSE Local socket mode and foreground terminal control for plugins (#12448) 2024-04-15 18:28:18 +00:00