You are here

function background_process_start in Background Process 8

Same name and namespace in other branches
  1. 6 background_process.module \background_process_start()
  2. 7.2 background_process.module \background_process_start()
  3. 7 background_process.module \background_process_start()

Implements to Start background process.

1 call to background_process_start()
background_batch_process_batch in background_batch/background_batch.module
Implements to Processes the batch.

File

./background_process.module, line 338
This module implements a framework for calling funtions in the background.

Code

function background_process_start($callback) {
  $process = new BackgroundProcess();
  $args = func_get_args();
  array_splice($args, 0, 1);
  $result = $process
    ->start($callback, $args);
  return $result ? $process->handle : $result;
}