new MessageQueue()

Description

A simple point-to-point system that will queue messages to be delivered.

This is similar to the WEB API's MessageChannel.

Details

Members


count :number

Details
number

Methods


post( ...items ) → {NexusHoratio.base.MessageQueue}

Parameters
Name Type Attributes Description
items object <repeatable>

Whatever to add to the queue.

Returns

This instance, for chaining.

Details

listen( [ func ] ) → {NexusHoratio.base.MessageQueue}

Parameters
Name Type Attributes Description
func function <optional>

Function that receives the messages. If falsy, the listener is removed.

Returns

This instance, for chaining.

Details