Progress on closures

This commit is contained in:
Netkas 2023-02-01 23:42:41 -05:00
parent 39d1084a3f
commit f88f453578
13 changed files with 427 additions and 144 deletions

15
tests/gearman_closure.php Normal file
View 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";
});