You are here

function background_process_generate_handle in Background Process 7

Same name and namespace in other branches
  1. 8 background_process.module \background_process_generate_handle()
  2. 6 background_process.module \background_process_generate_handle()

Get a unique handle based on a callback.

Parameters

callback $callback: Function to generate handle from.

Return value

string Handle.

1 call to background_process_generate_handle()
BackgroundProcess::__construct in ./BackgroundProcess.class.php
Constructor.

File

./background_process.module, line 377

Code

function background_process_generate_handle($callback) {
  return md5(serialize($callback) . ':' . microtime(TRUE) . ':' . rand(1, 5000));
}