AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
ThreadTask.h
1
6#pragma once
7
8#include <aws/core/Core_EXPORTS.h>
9#include <functional>
10#include <thread>
11#include <atomic>
12
13namespace Aws
14{
15 namespace Utils
16 {
17 namespace Threading
18 {
19 class PooledThreadExecutor;
20
21 class AWS_CORE_API ThreadTask
22 {
23 public:
26
31 ThreadTask(const ThreadTask&) = delete;
32 ThreadTask& operator =(const ThreadTask&) = delete;
34 ThreadTask& operator =(ThreadTask&&) = delete;
35
37
38 protected:
40
41 private:
42 std::atomic<bool> m_continue;
43 PooledThreadExecutor& m_executor;
44 std::thread m_thread;
45 };
46 }
47 }
48}
ThreadTask(const ThreadTask &)=delete
ThreadTask(ThreadTask &&)=delete
ThreadTask(PooledThreadExecutor &executor)