Structs

This defines a request to calculate the mean of the contained randoms
The response from a request to calculate the mean
This represents a simple collection of random numbers which is hosted inside the thread pool
This is message that sent to request the creation of a new Randoms struct with the specified id
An example of an element that contains a child thread pool
This is the request that is sent to create a new RandomsBatch It contains a field to configure the size of the contained child thread pool. As the this thread pool is shared it will only ever be used by the first request to create a RandomsBatch
This is the message that is sent to request that a given RandomsBatch calculates the sum of all of the sums of its contained Randoms
This response is returned from a request to calculate the sum of sums of all contained Randoms
This is the response from a request to calculate the sum of the contained random numbers

Enums

This enum defines the api used to communicate with the Randoms struct It defines two pairs of messages
One request the calculation of the mean and the other the calculation of the sum

Constants

A constant that allows the binding of the mean request and response messages at compile time
A constant that allows the binding of the sum request and response messages at compile time
define 2 constant to classify messages This allows us to leverage the type system avoid some runtime errors (and replace them with compile time errors)