21 lines
509 B
C++
21 lines
509 B
C++
/***
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: LSFromFdNonblocking.cpp
|
|
Date: 2022-4-5
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
namespace Aurora::IO::Loop
|
|
{
|
|
template<typename T>
|
|
inline bool IsSignaledFromNonblockingImpl(ILoopSourceEx *source, T * that, bool(T::*IsSignaledNonblocking)())
|
|
{
|
|
bool val {};
|
|
source->OnPresleep();
|
|
val = ((that)->*(IsSignaledNonblocking))();
|
|
source->OnFinishSleep();
|
|
return val;
|
|
}
|
|
} |