You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
32 lines
591 B
C++
32 lines
591 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "Asio/Asio.h"
|
|
#include "Containers/Array.h"
|
|
|
|
#include <thread>
|
|
|
|
namespace UE {
|
|
namespace Trace {
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
class FAsioContext
|
|
{
|
|
public:
|
|
FAsioContext(int32 ThreadCount);
|
|
~FAsioContext();
|
|
asio::io_context& Get();
|
|
void Start();
|
|
void Stop(bool bWait=false);
|
|
void Wait();
|
|
|
|
private:
|
|
asio::io_context* IoContext;
|
|
TArray<std::thread> ThreadPool;
|
|
bool bRunning = false;
|
|
};
|
|
|
|
} // namespace Trace
|
|
} // namespace UE
|