mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-25 13:30:07 +00:00
optimize worker i/o
This commit is contained in:
parent
0c606eb9e9
commit
0a28653355
1 changed files with 6 additions and 3 deletions
|
@ -50,9 +50,12 @@ function _p9k_worker_main() {
|
||||||
else
|
else
|
||||||
local REPLY=
|
local REPLY=
|
||||||
while true; do
|
while true; do
|
||||||
sysread -i $fd 'REPLY[$#REPLY+1]' && continue
|
if sysread -i $fd 'REPLY[$#REPLY+1]'; then
|
||||||
|
[[ $REPLY == *$'\x1e' ]] || continue
|
||||||
|
else
|
||||||
(( $? == 5 )) || return
|
(( $? == 5 )) || return
|
||||||
break
|
break
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
local cb=$_p9k_worker_fds[$fd]
|
local cb=$_p9k_worker_fds[$fd]
|
||||||
_p9k_worker_request_id=${cb%%$'\x1f'*}
|
_p9k_worker_request_id=${cb%%$'\x1f'*}
|
||||||
|
|
Loading…
Reference in a new issue