tghosgor / threadpool11

A fast, lock-free, cross-platform C++11 thread pool library that is aiming to be lightweight and simple.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Variable Arguements supported by the Work type?

itzurabhi opened this issue · comments

Does the implementation support variable number of arguments and passing them into the worker function or lambda?

From the library's point of view, the worker function does not have any arguments. You can either use std::bind to bind arguments to a worker function or use capturing in lambda functions. Either way you will need to use mutexes to guard writes to shared variables.

Thanks.

On Tue, Dec 17, 2013 at 10:36 PM, ET notifications@github.com wrote:

From the library's point of view, the worker function does not have any
arguments. You can either use std::bind to bind arguments to a worker
function or use capturing in lambda functions. Either way you will need to
use mutexes to guard shared writes to variables.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-30769460
.