Skip to content

Instantly share code, notes, and snippets.

@mshmsh5000
Created August 30, 2012 19:11
Show Gist options
  • Save mshmsh5000/3538012 to your computer and use it in GitHub Desktop.
Save mshmsh5000/3538012 to your computer and use it in GitHub Desktop.
Magento process locking - partial 1
<?php
class BigThings
{
/**
* Process all the things
*/
public function changeEverything()
{
$this->log("Starting...hold on to your hats.");
for ($i = 1; $i < 10000000000; $i++)
{
// Do something complicated with $i.
}
$this->log("Finished! Whew.");
}
/**
* Log a message to stdout.
*
* @param $msg
*/
public function log($msg)
{
echo $msg . PHP_EOL;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment