Set the job execution batch size for the queue with the specified id.

Synopsis

Declared in <bdlmt_multiqueuethreadpool.h>

int
setBatchSize(
    int id,
    int batchSize);

Description

Configure the queue specified by id to process jobs in groups of the specified batchSize (see {`Job Execution Batch Size`}). When a thread is selecting jobs for processing, if fewer than batchSize jobs are available then only the available jobs will be processed in the current batch. Return 0 on success, and a non‐zero value otherwise. The behavior is undefined unless 1 <= batchSize. Note that the initial value for the execution batch size is 1 for all queues.

Return Value

0 on success, and a non‐zero value otherwise

Parameters

Name

Description

id

queue identifier

batchSize

number of jobs to process per batch

Created with MrDocs