MCPcopy Create free account
hub / github.com/Alex-Rachel/TGameServer / NewWorkerPool

Function NewWorkerPool

manager/workPool.go:37–43  ·  view source on GitHub ↗
(workerlen int)

Source from the content-addressed store, hash-verified

35}
36
37func NewWorkerPool(workerlen int) *WorkerPool {
38 return &WorkerPool{
39 workerlen: workerlen,
40 JobQueue: make(chan Job),
41 WorkerQueue: make(chan chan Job, workerlen),
42 }
43}
44func (wp *WorkerPool) Run() {
45 fmt.Println("初始化worker")
46 //初始化worker

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected