PHP Classes

File: example2.php

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


Class file image Download
//In this example we load a task and then
//proceed to unload it based on the key.

//Include the task manager into our program

//Initialize the Manager
$manager=new TaskManager();

//Load the task "HelloWorld" and save the key
$key=$manager->add_task(new HelloWorld());

//Remove the task "HelloWorld"

//Check if there are any tasks in the pool
"Tasks present in the pool";
"No Tasks in the pool";