Pass arguments to worker function, instead of let it access the member fields of the wrapping class