function _background_process_ensure_cleanup in Background Process 7
Same name and namespace in other branches
- 8 background_process.module \_background_process_ensure_cleanup()
- 6 background_process.module \_background_process_ensure_cleanup()
Ensure lock is removed at end of request.
Parameters
string $handle: Handle of background process
bool $remove: If TRUE, don't remove when shutting down
3 calls to _background_process_ensure_cleanup()
File
- ./
background_process.module, line 1482
Code
function _background_process_ensure_cleanup($handle, $remove = FALSE) {
$handles =& drupal_static('background_process_handles_locked', NULL);
if (!isset($handles)) {
$handles = array();
drupal_register_shutdown_function('_background_process_cleanup_locks');
}
if ($remove) {
unset($handles[$handle]);
}
else {
$handles[$handle] = $handle;
}
}