move std function
This commit is contained in:
@@ -68,8 +68,8 @@ PIThreadPoolExecutor::~PIThreadPoolExecutor() {
|
||||
}
|
||||
|
||||
|
||||
void PIThreadPoolExecutor::execute(const std::function<void()> & runnable) {
|
||||
if (!isShutdown_) taskQueue.offer(runnable);
|
||||
void PIThreadPoolExecutor::execute(std::function<void()> runnable) {
|
||||
if (!isShutdown_) taskQueue.offer(std::move(runnable));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user