AWS SDK for C++
AWS SDK for C++ Version 1.11.440
Main Page
Related Pages
Namespaces
Classes
Modules
Search
Loading...
Searching...
No Matches
src
aws-cpp-sdk-core
include
aws
core
utils
threading
DefaultExecutor.h
1
6
#pragma once
7
8
#include <aws/core/utils/threading/Executor.h>
9
10
#include <aws/core/utils/memory/stl/AWSMap.h>
11
12
#include <atomic>
13
#include <functional>
14
#include <mutex>
15
#include <thread>
16
17
namespace
Aws
18
{
19
namespace
Utils
20
{
21
namespace
Threading
22
{
26
class
AWS_CORE_API
DefaultExecutor
:
public
Executor
27
{
28
public
:
29
DefaultExecutor
() : m_state(
State
::
Free
) {}
30
~DefaultExecutor
();
31
32
void
WaitUntilStopped
()
override
;
33
protected
:
34
enum class
State
35
{
36
Free
, Locked, Shutdown
37
};
38
bool
SubmitToThread
(std::function<
void
()>&&)
override
;
39
void
Detach
(std::thread::id
id
);
40
std::atomic<State>
m_state
;
41
Aws::UnorderedMap<std::thread::id, std::thread>
m_threads
;
42
};
43
}
// namespace Threading
44
}
// namespace Utils
45
}
// namespace Aws
Aws::Utils::Threading::DefaultExecutor
Definition
DefaultExecutor.h:27
Aws::Utils::Threading::DefaultExecutor::State
State
Definition
DefaultExecutor.h:35
Aws::Utils::Threading::DefaultExecutor::m_threads
Aws::UnorderedMap< std::thread::id, std::thread > m_threads
Definition
DefaultExecutor.h:41
Aws::Utils::Threading::DefaultExecutor::SubmitToThread
bool SubmitToThread(std::function< void()> &&) override
Aws::Utils::Threading::DefaultExecutor::~DefaultExecutor
~DefaultExecutor()
Aws::Utils::Threading::DefaultExecutor::Detach
void Detach(std::thread::id id)
Aws::Utils::Threading::DefaultExecutor::DefaultExecutor
DefaultExecutor()
Definition
DefaultExecutor.h:29
Aws::Utils::Threading::DefaultExecutor::m_state
std::atomic< State > m_state
Definition
DefaultExecutor.h:40
Aws::Utils::Threading::DefaultExecutor::WaitUntilStopped
void WaitUntilStopped() override
Aws::Utils::Threading::Executor
Definition
Executor.h:25
Aws
Definition
AmazonSerializableWebServiceRequest.h:16
Aws::Free
AWS_CORE_API void Free(void *memoryPtr)
Aws::UnorderedMap
std::unordered_map< K, V, std::hash< K >, std::equal_to< K >, Aws::Allocator< std::pair< const K, V > > > UnorderedMap
Definition
AWSMap.h:21
Generated by
1.9.8
Privacy |
Site terms |
Cookie preferences