Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator for number generation in go is not concurrently safe (for new source). In order to generate random number concurrently, a number of workers to generate the random numbers are needed. each worker will generate a random number and push it into a buffered channel Reference: https://golang.org/pkg/math/rand/
type RandWorker ¶
type RandWorker struct {
// contains filtered or unexported fields
}
RandWorker struct
func (*RandWorker) Work ¶
func (rw *RandWorker) Work()
Work via goroutines the worker will run forever when program runs but will get destroyed if the program exit
Click to show internal directories.
Click to hide internal directories.