File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ func (workerPoolSelf *DefaultWorkerPool) generateWorkerWithMaximum(maximum int)
223223 }()
224224}
225225
226- // SetJobQueue Set the JobQueue
226+ // SetJobQueue Set the JobQueue(WARNING: if the pool has started to use, doing this is not safe)
227227func (workerPoolSelf * DefaultWorkerPool ) SetJobQueue (jobQueue * fpgo.BufferedChannelQueue [func ()]) * DefaultWorkerPool {
228228 workerPoolSelf .jobQueue = jobQueue
229229 return workerPoolSelf
@@ -235,13 +235,13 @@ func (workerPoolSelf *DefaultWorkerPool) SetIsJobQueueClosedWhenClose(isJobQueue
235235 return workerPoolSelf
236236}
237237
238- // SetPanicHandler Set the panicHandler
238+ // SetPanicHandler Set the panicHandler(handle/log panic inside workers)
239239func (workerPoolSelf * DefaultWorkerPool ) SetPanicHandler (panicHandler func (interface {})) * DefaultWorkerPool {
240240 workerPoolSelf .panicHandler = panicHandler
241241 return workerPoolSelf
242242}
243243
244- // SetWorkerBatchSize Set the workerBatchSize
244+ // SetWorkerBatchSize Set the workerBatchSize(queued jobs number that every worker could have)
245245func (workerPoolSelf * DefaultWorkerPool ) SetWorkerBatchSize (workerBatchSize int ) * DefaultWorkerPool {
246246 workerPoolSelf .workerBatchSize = workerBatchSize
247247 workerPoolSelf .notifyWorkers ()
You can’t perform that action at this time.
0 commit comments