Skip to content

Commit

Permalink
two step evaluation of prompt to reduce time on setting universal var…
Browse files Browse the repository at this point in the history
…iable

Unfortunately this doesn't fix the error:
`<W> fish: Locking the universal var file took too long (1.004 seconds).`
I think that error is caused by too many threads waiting on the
universal file lock:
https://github.com/fish-shell/fish-shell/blob/master/src/env_universal_common.cpp#L569
  • Loading branch information
mec07 committed Oct 24, 2018
1 parent 05442f6 commit a816542
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion conf.d/__async_prompt.fish
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ and begin
set st $status

for func in (__async_prompt_config_functions)
__async_prompt_config_inherit_variables | __async_prompt_spawn $st 'set -U __async_prompt_'$func'_text_'(__async_prompt_pid)' ('$func')'
__async_prompt_config_inherit_variables | __async_prompt_spawn $st 'set -l prompt ('$func'); and set -U __async_prompt_'$func'_text_'(__async_prompt_pid)' $prompt'
function '__async_prompt_'$func'_handler' --on-process-exit (jobs -lp | tail -n1)
kill -WINCH (__async_prompt_pid)
sleep 0.1
Expand Down

0 comments on commit a816542

Please sign in to comment.