git.graph-it.com
/
graphit
/
concurrent.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
528266e
)
Use closure to access protected method.
v0.1.1
author
Sebastian Brix
<sebastian.brix@graph-it.com>
Mon, 20 Mar 2023 16:10:38 +0000
(17:10 +0100)
committer
Sebastian Brix
<sebastian.brix@graph-it.com>
Mon, 20 Mar 2023 16:10:38 +0000
(17:10 +0100)
src/Thread.php
patch
|
blob
|
history
diff --git
a/src/Thread.php
b/src/Thread.php
index 0a0a9d6b24da3d74524eb1c0be463007b70ca44d..deb20ade246410566f953cf1a4d7644864d2d95c 100644
(file)
--- a/
src/Thread.php
+++ b/
src/Thread.php
@@
-43,8
+43,8
@@
abstract class Thread
Thread::$current = $current;
Thread::$current->pid = posix_getpid();
- pcntl_signal(SIGTERM,
array(Thread::$current, 'termHandler')
);
- pcntl_signal(SIGCHLD,
array(Thread::$current, 'chldHandler')
);
+ pcntl_signal(SIGTERM,
function() { Thread::$current->termHandler(); }
);
+ pcntl_signal(SIGCHLD,
function() { Thread::$current->chldHandler(); }
);
}
/**