CeresEngine
0.2.0
A game development framework
Loading...
Searching...
No Matches
DispatchQueue.hpp
Go to the documentation of this file.
1
//
2
// CeresEngine - A game development framework
3
//
4
// Created by Rogiel Sulzbach.
5
// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6
//
7
8
#pragma once
9
10
#include "
CeresEngine/Foundation/Poly.hpp
"
11
#include "
CeresEngine/Foundation/SmartPtr.hpp
"
12
#include "
CeresEngine/Foundation/Threading/ExecutionContext.hpp
"
13
14
namespace
CeresEngine
{
15
17
enum class
DispatchQueueType
{
19
Serial
,
20
22
Concurrent
,
23
};
24
36
class
DispatchQueue
:
public
ExecutionContext
{
37
public
:
60
virtual
void
suspend
() = 0;
61
75
virtual
void
resume
() = 0;
76
77
public
:
// Sub-queues
78
virtual
UPtr<DispatchQueue>
createSubQueue
(
DispatchQueueType
type,
StringView
name =
""
) = 0;
79
};
80
81
}
// namespace CeresEngine
ExecutionContext.hpp
Poly.hpp
SmartPtr.hpp
CeresEngine::BasicStringView< char >
CeresEngine::DispatchQueue
An object that manages the execution of tasks serially or concurrently on your app's main thread or o...
Definition
DispatchQueue.hpp:36
CeresEngine::DispatchQueue::suspend
virtual void suspend()=0
Suspends the invocation of function objects on a queue.
CeresEngine::DispatchQueue::createSubQueue
virtual UPtr< DispatchQueue > createSubQueue(DispatchQueueType type, StringView name="")=0
CeresEngine::DispatchQueue::resume
virtual void resume()=0
Resumes the invocation of block objects on a queue.
CeresEngine::ExecutionContext
A context for function object execution.
Definition
ExecutionContext.hpp:90
CeresEngine
Definition
Application.hpp:19
CeresEngine::UPtr
std::unique_ptr< T, Deleter > UPtr
UPtr is a smart pointer that owns and manages another object through a pointer and disposes of that o...
Definition
SmartPtr.hpp:28
CeresEngine::DispatchQueueType
DispatchQueueType
Specifies the type of the queue.
Definition
DispatchQueue.hpp:17
CeresEngine::DispatchQueueType::Concurrent
@ Concurrent
A dispatch queue that executes blocks concurrently.
CeresEngine::DispatchQueueType::Serial
@ Serial
A dispatch queue that executes blocks serially in FIFO order.
Sources
CeresEngine
Foundation
Threading
DispatchQueue.hpp
Generated by
1.9.8