Enqueue functor for execution by a worker thread.

Synopsis

Declared in <bdlmt_threadpool.h>

int
enqueueJob(Job const& functor);

Description

Enqueue the specified functor to be executed by the next available thread. Return 0 if enqueued successfully, and a non‐zero value if queuing is currently disabled. The behavior is undefined unless functor is not "unset". See bsl::function for more information on functors.

Return Value

0 if enqueued successfully, and a non‐zero value if queuing is disabled

Parameters

Name

Description

functor

job to enqueue

Created with MrDocs