-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
I've been using zsh-async on a theme (based on zprezto's sorin prompt) but I've frequently noticed async stops working.
I only initialize the worker once, during precmd:
# Initialize async worker. This needs to be done here and not in
# prompt_kronuz_setup so the git formatting can be overridden by other prompts.
if (( !${prompt_kronuz_async_init:-0} )); then
async_start_worker "prompt_kronuz" -n
async_register_callback "prompt_kronuz" prompt_kronuz_async_callback
typeset -g prompt_kronuz_async_init=1
fi
# Kill the old process of slow commands if it is still running.
async_flush_jobs "prompt_kronuz"
# Compute slow commands in the background.
async_job "prompt_kronuz" prompt_kronuz_async_git "$PWD"Not knowing why, I added some logging and I'm now seeing async_job is being called, but the job function (prompt_kronuz_async_git) is not... as if the worker had died?
Is there a way I could list active workers? ...or how can I know if worker died? ...and why?
Edit:
If I call zpty, I see this: (finished) prompt_kronuz: _async_worker -p 89022 -n... which sure enough shows the async worker as finished. Is there a way to know why, or if it's finished automatically restart it?
Metadata
Metadata
Assignees
Labels
No labels