You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be a max argument size which causes zsh-async to just silently error:
function foobar()
{
echo $1
}
source ~/.zsh-async/async.zsh
async_init
# Initialize a new worker (with notify option)
async_start_worker my_worker -n
# Create a callback function to process results
completed_callback() {
echo $@
}
# Register callback function for the workers completed jobs
async_register_callback my_worker completed_callback
# Give the worker some tasks to perform
async_job my_worker foobar $(i=0; while [ $i -lt 1000 ]; do echo -n "1"; i=$((i+1)); done)
sleep 1
Maybe it's platform dependent, so please increase if you still see the $@ output from the callback.
If you hit the error, you will not see the $@ output in the callback.
The text was updated successfully, but these errors were encountered:
I found a workaround for my specific issue. My issue was that I needed to send a large environment variable value as parameter, because it can change.
My workaround for now is to recognize the environment value is changed during a callback, if so, restart the worker. The worker's environment is then the same as the main environment.
There seems to be a max argument size which causes zsh-async to just silently error:
Maybe it's platform dependent, so please increase if you still see the
$@
output from the callback.If you hit the error, you will not see the
$@
output in the callback.The text was updated successfully, but these errors were encountered: