Created
August 30, 2012 19:10
-
-
Save mshmsh5000/3537982 to your computer and use it in GitHub Desktop.
Magento process locking - partial 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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