CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
LimitedTaskQueue Class Reference

#include "FWCore/Concurrency/interface/LimitedTaskQueue.h"

Detailed Description

Description: Runs a set number of tasks from the queue at a time

Usage: A LimitedTaskQueue is used to provide access to a limited thread-safe resource. You create a LimitedTaskQueue for the resource. When every you need to perform an operation on the resource, you push a 'task' that does that operation onto the queue. The queue then makes sure to run a limited number of tasks at a time.

The 'tasks' managed by the LimitedTaskQueue are just functor objects who which take no arguments and return no values. The simplest way to create a task is to use a C++11 lambda.