mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 13:53:10 +00:00
Only perform universal barriers for the principal env stack
In practice this means that, if fish ever gets multiple variable stacks, we will only incorporate environment variable changes from other fish instances on the "main thread."
This commit is contained in:
parent
0f78700f6b
commit
3571754e06
1 changed files with 5 additions and 0 deletions
|
@ -1208,6 +1208,11 @@ mod_result_t env_stack_impl_t::remove(const wcstring &key, int mode) {
|
|||
}
|
||||
|
||||
bool env_stack_t::universal_barrier() {
|
||||
// Only perform universal barriers for the principal env stack.
|
||||
// This means that changes from other fish processes will only be visible when the "main thread
|
||||
// runs."
|
||||
if (!is_principal()) return false;
|
||||
|
||||
ASSERT_IS_MAIN_THREAD();
|
||||
if (!uvars()) return false;
|
||||
|
||||
|
|
Loading…
Reference in a new issue