Class - XPSPL\Queue

As of v0.3.0 Queues no longer maintain a reference to a signal.

The Queue is still a representation of a PriorityQueue and will remain so until the issues with PHP’s current implementation are addressed.

The queue can also be explicity set to a MIN or MAX heap upon construction.

Methods

enqueue

enqueue($node[, $priority = false])

Pushes a new handler into the queue.

Parameters:
  • mixed – Variable to store
  • integer – Priority of the callable
Throws OverflowException:
 

If max size exceeded

Return type:

void

dequeue

dequeue($node)

Removes a handle from the queue.

Parameters:mixed – Reference to the node.
Throws InvalidArgumentException:
 
Return type:boolean

sort

sort()

Sorts the queue.

Return type:void

Constants

QUEUE_MAX_SIZE

Defines the maximum number of handlers allowed within a Queue.

QUEUE_DEFAULT_PRIORITY

Defines the default priority of queue nodes

Last updated on 02/01/13 07:27am

Project Versions

Table Of Contents

Previous topic

Class - XPSPL\Processor

Next topic

Class - XPSPL\Routine

This Page