mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 03:03:57 +08: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
|
@ -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 New Issue
Block a user