PHP Classes

Queue Class: Manage a queue of users competing to run a task

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 61%Total: 1,613 All time: 2,446 This week: 455Up
Version License Categories
queue_class 1.0GNU General Publi...Databases, Design Patterns
Description 

Author

This class can be used to manage a queue of users competing to execute a task that can only be run by a single user at a time.

The class stores in a MySQL table the queue of users that want to execute a task.

An entry in the queue table is added for each user that wants to run the task.

While the current user is not the next to run the task, he must wait for his turn.

When the first user in the queue finishes to run the task, its queue entry is deleted to pass the turn to the next user in the queue.

Picture of Matthew McConnell
Name: Matthew McConnell <contact>
Classes: 1 package by
Country: United Kingdom

  Files folder image Files (3)  
File Role Description
Accessible without login HTML file examples.php Example Examples
Plain text file class_queue.php Class Main Class
Accessible without login HTML file documentation.htm Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,613
This week:0
All time:2,446
This week:455Up
User Ratings User Comments (2)
 All time
Utility:85%StarStarStarStarStar
Consistency:70%StarStarStarStar
Documentation:70%StarStarStarStar
Examples:50%StarStarStar
Tests:-
Videos:-
Overall:61%StarStarStarStar
Rank:1041
 
The class is usefull but the code is a little out of date.
7 years ago (zinsou A.A.E.Moïse)
70%StarStarStarStar
Stupid idea.
12 years ago (Maciej Wnuk)
10%Star