HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
UT_ThreadIOPool.h
Go to the documentation of this file.
1
/*
2
* PROPRIETARY INFORMATION. This software is proprietary to
3
* Side Effects Software Inc., and is not to be reproduced,
4
* transmitted, or disclosed in any way without written permission.
5
*
6
* NAME: UT_ThreadIOPool.h
7
*
8
* COMMENTS:
9
*
10
*
11
*/
12
13
#ifndef __UT_THREADIOPOOL_H__
14
#define __UT_THREADIOPOOL_H__
15
16
#include "
UT_API.h
"
17
18
#include "
UT_BoostAsio.h
"
19
20
#include "
UT_Lock.h
"
21
#include "
UT_Thread.h
"
22
#include "
UT_UniquePtr.h
"
23
24
class
UT_API
UT_ThreadIOPool
25
{
26
public
:
27
static
UT_ThreadIOPool
& instance();
28
29
ASIO_IOContext
&
context
() {
return
myIOContext; }
30
31
void
stop();
32
void
start
(
int
nthreads);
33
34
private
:
35
UT_ThreadIOPool
() =
default
;
36
37
mutable
UT_Lock
myLock;
38
UT_UniquePtr<UT_StdThreadGroup<true>
> myThreadGroup;
39
ASIO_IOContext
myIOContext;
40
UT_UniquePtr
<hboost::asio::executor_work_guard<
41
hboost::asio::io_context::executor_type>>
42
myIOWorkGuard;
43
};
44
45
#endif // __UT_THREADIOPOOL_H__
46
UT_ThreadIOPool
Definition:
UT_ThreadIOPool.h:24
UT_BoostAsio.h
start
GLuint start
Definition:
glcorearb.h:475
UT_API.h
UT_API
#define UT_API
Definition:
UT_API.h:14
UT_SpinLockT< true, false >
UT_UniquePtr
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition:
UT_UniquePtr.h:39
UT_ThreadIOPool::context
ASIO_IOContext & context()
Definition:
UT_ThreadIOPool.h:29
ASIO_IOContext
hboost::asio::io_context ASIO_IOContext
Definition:
UT_BoostAsio.h:74
UT_UniquePtr.h
UT_Lock.h
UT_Thread.h
UT
UT_ThreadIOPool.h
Generated on Fri Apr 26 2024 03:17:06 for HDK by
1.8.6