32 lines
796 B
C++
32 lines
796 B
C++
/***
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: ILoopSource.hpp
|
|
Date: 2022-2-12
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
namespace Aurora::IO::Loop
|
|
{
|
|
struct ILoopSource
|
|
{
|
|
/**
|
|
* @brief Atomic is-signaled-and-latch
|
|
* @return
|
|
*/
|
|
virtual bool IsSignaled() = 0;
|
|
|
|
/**
|
|
* @brief Returns a generic description about the loop source handle
|
|
* @return
|
|
*/
|
|
virtual ELoopSource GetType() = 0;
|
|
|
|
/**
|
|
* @breif Blocks the current thread for the kernel primitives
|
|
* @warning Are you looking for LoopQueues? You can even reduce async threads down to kernel ILoopQueue's
|
|
*/
|
|
virtual bool WaitOn(AuUInt32 timeout = 0) = 0;
|
|
};
|
|
} |