PHP Classes

File: example3.php

Recommend this page to a friend!
  Classes of Sildaekar Decrura   PTM   example3.php   Download  
File: example3.php
Role: Example script
Content type: text/plain
Description: Example 3
Class: PTM
Manage PHP tasks running in parallel processes
Author: By
Last change: Fixed file pointer
Date: 10 years ago
Size: 527 bytes


Class file image Download
//In this example we load and run the task "HelloWorld" with forking enabled

//Include the task manager into our program

//Initialize the Manager with throttle enabled
$manager=new TaskManager(true);

//Load the task "HelloWorld" along with TRUE to enable forking 10 times
$manager->add_task(new HelloWorld(),TRUE);

//Make sure there are tasks present
//Run all loaded tasks