ME 305 Group 6 Documentation
Public Member Functions | List of all members
shares_02.Queue_02 Class Reference

A queue of shared data. More...

Public Member Functions

def __init__ (self)
 Constructs an empty queue of shared values.
 
def put (self, item)
 Adds an item to the end of the queue. More...
 
def get (self)
 Remove the first item from the front of the queue. More...
 
def num_in (self)
 Find the number of items in the queue. More...
 

Detailed Description

A queue of shared data.

Values can be accessed with placed into queue with put() or removed from the queue with get(). Check if there are items in the queue with num_in() before using get().

Member Function Documentation

◆ get()

def shares_02.Queue_02.get (   self)

Remove the first item from the front of the queue.

Returns
The value of the item removed

◆ num_in()

def shares_02.Queue_02.num_in (   self)

Find the number of items in the queue.

Call before get().

Returns
The number of items in the queue

◆ put()

def shares_02.Queue_02.put (   self,
  item 
)

Adds an item to the end of the queue.

Parameters
itemThe new item to append to the queue.

The documentation for this class was generated from the following file: