From 499d5a942fc2ad0149b0a16e978e090336dd8319 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Tue, 7 Nov 2023 10:32:07 +1100 Subject: Add a wrapper codec source that does readahead --- src/tasks/tasks.cpp | 3 +-- src/tasks/tasks.hpp | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src/tasks') diff --git a/src/tasks/tasks.cpp b/src/tasks/tasks.cpp index ca93336f..8ff57d4a 100644 --- a/src/tasks/tasks.cpp +++ b/src/tasks/tasks.cpp @@ -195,8 +195,7 @@ Worker::~Worker() { } template <> -auto Worker::Dispatch(const std::function& fn) - -> std::future { +auto Worker::Dispatch(const std::function fn) -> std::future { std::shared_ptr> promise = std::make_shared>(); WorkItem item{ diff --git a/src/tasks/tasks.hpp b/src/tasks/tasks.hpp index 2f008120..06cbd26b 100644 --- a/src/tasks/tasks.hpp +++ b/src/tasks/tasks.hpp @@ -106,7 +106,7 @@ class Worker { * asynchronously returns the result as a future. */ template - auto Dispatch(const std::function& fn) -> std::future { + auto Dispatch(const std::function fn) -> std::future { std::shared_ptr> promise = std::make_shared>(); WorkItem item{ @@ -125,6 +125,6 @@ class Worker { /* Specialisation of Evaluate for functions that return nothing. */ template <> -auto Worker::Dispatch(const std::function& fn) -> std::future; +auto Worker::Dispatch(const std::function fn) -> std::future; } // namespace tasks -- cgit v1.2.3