nushell/crates/nu-plugin/src
Devyn Cairns c82dfce246
Fix deadlock on PluginCustomValue drop (#12418)
# Description
Because the plugin interface reader thread can be responsible for
sending a drop notification, it's possible for it to end up in a
deadlock where it's waiting for the response to the drop notification
call.

I decided that the best way to address this is to just discard the
response and not wait for it. It's not really important to synchronize
with the response to `Dropped`, so this is probably faster anyway.

cc @ayax79, this is your issue where polars is getting stuck

# User-Facing Changes
- A bug fix
- Custom value plugin: `custom-value handle update` command

# Tests + Formatting

Tried to add a test with a long pipeline with a lot of drops and run it
over and over to reproduce the deadlock.

- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`
2024-04-05 21:57:00 -05:00
..
plugin Fix deadlock on PluginCustomValue drop (#12418) 2024-04-05 21:57:00 -05:00
protocol Make drop notification timing for plugin custom values more consistent (#12341) 2024-04-04 09:13:25 +02:00
serializers Rename Value::CustomValue to Value::Custom (#12309) 2024-03-27 22:10:56 +01:00
util Make drop notification timing for plugin custom values more consistent (#12341) 2024-04-04 09:13:25 +02:00
lib.rs Make drop notification timing for plugin custom values more consistent (#12341) 2024-04-04 09:13:25 +02:00
sequence.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00