Progress on closures
This commit is contained in:
parent
39d1084a3f
commit
f88f453578
13 changed files with 427 additions and 144 deletions
15
tests/gearman_closure.php
Normal file
15
tests/gearman_closure.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
require 'ncc';
|
||||
|
||||
use Tamer\Objects\JobResults;
|
||||
use Tamer\Objects\Task;
|
||||
|
||||
import('net.nosial.tamerlib', 'latest');
|
||||
|
||||
$client = new \Tamer\Protocols\GearmanClient();
|
||||
$client->addServer();
|
||||
|
||||
$client->closure(function () {
|
||||
echo "This function was sent from a client, it should be executed on the worker";
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue