Photon Editor Library 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
TQueryPerformer.ipp
Go to the documentation of this file.
1#pragma once
2
4
5namespace ph::editor
6{
7
8template<typename Target>
10
11template<typename Target>
13{
14 if(m_readyFlag.test(std::memory_order_relaxed))
15 {
16 if(m_readyFlag.test(std::memory_order_acquire))
17 {
18 return true;
19 }
20 }
21
22 return false;
23}
24
25template<typename Target>
27{
28 m_cancelFlag.test_and_set(std::memory_order_relaxed);
29}
30
31template<typename Target>
33{
34 m_readyFlag.test_and_set(std::memory_order_release);
35}
36
37template<typename Target>
38inline bool TQueryPerformer<Target>::isCanceled() const
39{
40 return m_cancelFlag.test(std::memory_order_relaxed);
41}
42
43}// end namespace ph::editor
Definition TQueryPerformer.h:12
bool isReady() const
Whether the query was finished and the result is ready.
Definition TQueryPerformer.ipp:12
void cancel()
Definition TQueryPerformer.ipp:26
Definition ph_editor.h:10