# Module msg_queue

- Description
- Data Types
- Function Index
- Function Details

Implements helper functions for queuing messages and sending them in the order they have been queued.

Copyright © 2010-2011 Zuse Institute Berlin

Version: $Id$

Authors: Nico Kruber (`kruber@zib.de`).

## Description

Implements helper functions for queuing messages and sending them in the order they have been queued.

## Data Types

### msg_queue()

    msg_queue() = [comm:message()]

## Function Index

add/2 | Adds a message to a given queue.
is_empty/1 | Checks whether the message queue is empty.
new/0 | Creates a new message queue.
send/1 | Sends queued messages to the process calling the method, i.e.

## Function Details

### new/0

    new() -> msg_queue()

Creates a new message queue.

### is_empty/1

    is_empty(QueuedMessages :: msg_queue()) -> boolean()

Checks whether the message queue is empty.

### add/2

    add(QueuedMessages :: msg_queue(), NewMessage :: comm:message()) ->
           msg_queue()

Adds a message to a given queue.

### send/1

    send(QueuedMessages :: msg_queue()) -> ok

Sends queued messages to the process calling the method, i.e. self(), in the order the messages have been queued.

Generated by EDoc, Apr 22 2017, 15:58:21.