spacezsh-prompt icon indicating copy to clipboard operation
spacezsh-prompt copied to clipboard

Some jobs are not done when too many sections are run async in the worker

Open laggardkernel opened this issue 4 years ago • 1 comments
trafficstars

Current behavior

When too many sections are enable with ::async, some of them failed to be rendered and placeholder is displayed. Seems some of the jobs are not done in the worker.

Need to dig it deeper when I have spare time.

Environment

Spaceship version: v4.5.0-8-g9ecf72b Zsh version: zsh 5.8 (x86_64-apple-darwin18.7.0) Zsh plugin manager: zinit Terminal emulator: iTerm + tmux Operating system: macOS 10.14.6

laggardkernel avatar Nov 25 '20 02:11 laggardkernel

Update 1: It turns out zpty -w $worker "$@"$'\0' failed after too many jobs have been sent, before zpty -r is called.


The unfinished jobs are passed into _async_send_job in zsh-async and added into worker by zpty -w $worker "$@"$'\0'. Besides, by searching async_stop_worker usage in this prompt, it's called only once in precmd hook, which is the expected behavior.

So, the bug is deemed a problem from zsh-async's implementation, but not my part, for the time being.

Ref: https://github.com/mafredri/zsh-async/issues/18

laggardkernel avatar Nov 25 '20 05:11 laggardkernel