mirror of
https://github.com/nushell/nushell.git
synced 2024-11-22 16:33:37 +01:00
ab08328a30
# Description This fixes a race condition where all interfaces to a plugin might have been dropped, but both sides are still expecting input, and the `PluginInterfaceManager` doesn't get a chance to see that the interfaces have been dropped and stop trying to consume input. As the manager needs to hold on to a writer, we can't automatically close the stream, but we also can't interrupt it if it's in a waiting to read. So the best solution is to send a message to the plugin that we are no longer going to be sending it any plugin calls, so that it knows that it can exit when it's done. This race condition is a little bit tricky to trigger as-is, but can be more noticeable when running plugins in a tight loop. If too many plugin processes are spawned at one time, Nushell can start to encounter "too many open files" errors, and not be very useful. # User-Facing Changes # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` # After Submitting I will need to add `Goodbye` to the protocol docs |
||
---|---|---|
.. | ||
nu_plugin_python_example.py |