Skip to content

Max argument size of around 1000 chars #68

@hansbogert

Description

@hansbogert

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions