Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
platform
Concurrency
Tasks
DefaultWorkPool.h
1
// Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2
3
#pragma once
4
5
#include "Types.h"
6
#include "IWorkPool.h"
7
#include "Tasks.h"
8
#include "MessageQueue.h"
9
#include "TaskWorkPool.h"
10
#include "IGlTaskContextFactory.h"
11
12
namespace
Eegeo
13
{
14
namespace
Concurrency
15
{
16
namespace
Tasks
17
{
18
class
DefaultWorkPool
:
protected
Eegeo::NonCopyable
,
public
IWorkPool
19
{
20
public
:
21
DefaultWorkPool
(
Eegeo::Concurrency::Tasks::IGlTaskContextFactory
& taskContextFactory,
22
Eegeo::Concurrency::IThreadService
& threadService,
23
int
numWorkers);
24
~
DefaultWorkPool
();
25
26
void
Start();
27
void
Stop();
28
void
Shutdown();
29
void
QueueWork(
WorkItem
* workItem);
30
void
Flush();
31
TaskWorkPoolState::Values GetState()
const
;
32
33
private
:
34
Messaging::MessageQueue<Messages::ITaskMessage*>
* m_pWorkerMessageQueue;
35
Messaging::MessageQueue<Messages::ITaskPoolMessage*>
* m_pPoolMessageQueue;
36
TaskWorkPool
* m_pWorkPool;
37
std::vector<TaskWorker*> m_workers;
38
IGlTaskContextFactory
& m_taskContextFactory;
39
};
40
}
41
}
42
}
Generated on Sat Jun 10 2023 02:00:29 for eeGeo Platform SDK by
1.8.3.1