worker

package
v0.7.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2022 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	Cfg  core.SimulationConfig
	Seed int64
}

type Pool

type Pool struct {
	QueueCh chan Job
	StopCh  chan bool
	// contains filtered or unexported fields
}

func New

func New(maxWorker int, respCh chan simulation.Result, errCh chan error) *Pool

New creates a new Pool. Jobs can be sent to new pool by sending to p.QueueCh Closing p.StopCh will cause the pool to stop executing any queued jobs and currently working workers will no longer send back responses

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL