Run sparks in batches, instead of creating a new thread for each one