//
pkg.gl
Category
github.com/ibiscum/Go-Programming-Cookbook-Second-Edition
chapter10
internal
pool
package
0.0.0-20241212173216-745cb4b42230
Repository:
https://github.com/ibiscum/go-programming-cookbook-second-edition.git
Documentation:
pkg.go.dev
Overview
Versions
1
Dependencies
4
Dependents
1
Files
76 SLOC
#
Functions
Dispatch
Dispatch creates numWorker workers, returns a cancel functionand channels for adding work and responses, cancel must be called.
Process
Process dispatches work to the worker pool channel.
Worker
Worker loops forever and is part of the worker pool.
#
Constants
Compare
Compare is bcrypt compare work.
Hash
Hash is the bcrypt work type.
#
Structs
WorkRequest
WorkRequest is a worker req.
WorkResponse
WorkResponse is a worker resp.