diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-11-07 10:32:07 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-11-07 10:32:07 +1100 |
| commit | 499d5a942fc2ad0149b0a16e978e090336dd8319 (patch) | |
| tree | 1f671f0e3025b1350b25511e2442dfede19677df /src/tasks/tasks.hpp | |
| parent | d36fe9be6b522a3dade389213a0bb7e26a169627 (diff) | |
| download | tangara-fw-499d5a942fc2ad0149b0a16e978e090336dd8319.tar.gz | |
Add a wrapper codec source that does readahead
Diffstat (limited to 'src/tasks/tasks.hpp')
| -rw-r--r-- | src/tasks/tasks.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
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 <typename T> - auto Dispatch(const std::function<T(void)>& fn) -> std::future<T> { + auto Dispatch(const std::function<T(void)> fn) -> std::future<T> { std::shared_ptr<std::promise<T>> promise = std::make_shared<std::promise<T>>(); WorkItem item{ @@ -125,6 +125,6 @@ class Worker { /* Specialisation of Evaluate for functions that return nothing. */ template <> -auto Worker::Dispatch(const std::function<void(void)>& fn) -> std::future<void>; +auto Worker::Dispatch(const std::function<void(void)> fn) -> std::future<void>; } // namespace tasks |
