From bc608e514771939f6a8c006a6755e1126dddaa9d Mon Sep 17 00:00:00 2001 From: coderstephen Date: Sat, 22 Aug 2015 16:13:52 -0500 Subject: [PATCH] Add example for worker thread --- examples/worker-thread.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 examples/worker-thread.php diff --git a/examples/worker-thread.php b/examples/worker-thread.php new file mode 100755 index 0000000..8641c8b --- /dev/null +++ b/examples/worker-thread.php @@ -0,0 +1,27 @@ +#!/usr/bin/env php +start(); + + $returnValue = (yield $worker->enqueue(new HelloTask())); + yield $worker->shutdown(); +}); + +Loop\run();