Permalink
Browse files

fix #74

fix #74
  • Loading branch information...
1 parent 2e2ce26 commit 24ab3fcb22a9a62f5fa6ad95c5269a92d3d74b18 @krakjoe committed Mar 19, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 examples/Scope.php
View
@@ -22,7 +22,7 @@ private function noaccess(){
/*
* This protected method can only be called by one thread at a time
*/
- protected function synchronized($arg = null){
+ protected function exclusive($arg = null){
printf("IN->%s: %s\n", __METHOD__, microtime(true));
if ($arg)
$result = sprintf("%s: got \"%s\"", __METHOD__, $arg);
@@ -43,7 +43,7 @@ public function __construct($data){
public function run(){
printf("IN->%s: %s\n", __METHOD__, microtime(true));
- printf("%s: %s\n", __METHOD__, $this->synchronized(strrev($this->data)));
+ printf("%s: %s\n", __METHOD__, $this->exclusive(strrev($this->data)));
printf("%s: %s\n", __METHOD__, microtime(true));
printf("%s: %s\n", __METHOD__, $this->noaccess());
printf("OUT->%s: %s\n", __METHOD__, microtime(true));
@@ -59,11 +59,11 @@ public function run(){
/*
* You can see that this call is blocked until the threading context returns from the method
*/
-printf("Process: %s\n", $thread->synchronized());
+printf("Process: %s\n", $thread->exclusive());
/*
* Passing an argument on the command line will show you what happens when you call a private method from here
*/
if ($argv[1])
printf("Process: %s\n", $thread->noaccess());
-?>
+?>

0 comments on commit 24ab3fc

Please sign in to comment.