nushell/tests/plugins
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
..
formats Correct line folding in from ics/from vcf (#10577) 2023-10-03 19:11:16 +02:00
cache_file.rs Accept filenames in other plugin management commands (#12639) 2024-04-24 06:28:45 -05:00
config.rs Merge stream_example into example plugin and clean up names (#12234) 2024-03-19 12:36:46 -05:00
core_inc.rs Plugin explicit flags (#11581) 2024-01-22 15:00:43 -06:00
custom_values.rs Fix deadlock on PluginCustomValue drop (#12418) 2024-04-05 21:57:00 -05:00
env.rs Merge stream_example into example plugin and clean up names (#12234) 2024-03-19 12:36:46 -05:00
mod.rs Overhaul the plugin cache file with a new msgpack+brotli format (#12579) 2024-04-21 07:36:26 -05:00
nu_plugin_nu_example.rs Deprecate register and add plugin use (#12607) 2024-04-23 06:37:50 -05:00
register.rs Change PluginCommand API to be more like Command (#12279) 2024-03-27 11:59:57 +01:00
stream.rs Merge stream_example into example plugin and clean up names (#12234) 2024-03-19 12:36:46 -05:00
stress_internals.rs Fix (and test) for a deadlock that can happen while waiting for protocol info (#12633) 2024-04-24 08:44:04 -05:00