Lucas Murray ME 305 Portfolio
Public Member Functions | List of all members
shares.Share Class Reference

A standard shared variable. More...

Public Member Functions

def __init__ (self, initial_value=None)
 Constructs a shared variable. More...
 
def write (self, item)
 Updates the value of the shared variable. More...
 
def read (self)
 Access the value of the shared variable. More...
 

Detailed Description

A standard shared variable.

Values can be accessed with read() or changed with write()

Constructor & Destructor Documentation

◆ __init__()

def shares.Share.__init__ (   self,
  initial_value = None 
)

Constructs a shared variable.

Parameters
initial_valueAn optional initial value for the shared variable.

Member Function Documentation

◆ read()

def shares.Share.read (   self)

Access the value of the shared variable.

Returns
The value of the shared variable

◆ write()

def shares.Share.write (   self,
  item 
)

Updates the value of the shared variable.

Parameters
itemThe new value for the shared variable

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