[*] cont
This commit is contained in:
parent
1fac842e24
commit
69f7260514
@ -72,7 +72,7 @@ namespace Aurora::Threading
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::conditional_t<AuIsPointer_v<T>, T, T*> annoying_;
|
AuConditional_t<AuIsPointer_v<T>, T, T*> annoying_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define AU_LOCK_GUARD(variable) Aurora::Threading::LockGuard<decltype(variable)> AU_CONCAT(__stack_lock, __COUNTER__) (variable);
|
#define AU_LOCK_GUARD(variable) Aurora::Threading::LockGuard<decltype(variable)> AU_CONCAT(__stack_lock, __COUNTER__) (variable);
|
||||||
|
@ -82,7 +82,7 @@ namespace Aurora::Threading
|
|||||||
return bLockSuccessful;
|
return bLockSuccessful;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
std::conditional_t<AuIsPointer_v<T>, T, T*> annoying_;
|
AuConditional_t<AuIsPointer_v<T>, T, T*> annoying_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
namespace Aurora::Threading
|
namespace Aurora::Threading
|
||||||
{
|
{
|
||||||
using PollCallback_cb = std::function<bool()>;
|
using PollCallback_cb = AuFunction<bool()>;
|
||||||
|
|
||||||
AUKN_SYM bool YieldPollNs(bool permitMultipleContextSwitches, AuUInt64 timeoutNs, PollCallback_cb cb);
|
AUKN_SYM bool YieldPollNs(bool permitMultipleContextSwitches, AuUInt64 timeoutNs, PollCallback_cb cb);
|
||||||
AUKN_SYM bool YieldPoll(bool permitMultipleContextSwitches, AuUInt64 timeoutMs, PollCallback_cb cb);
|
AUKN_SYM bool YieldPoll(bool permitMultipleContextSwitches, AuUInt64 timeoutMs, PollCallback_cb cb);
|
||||||
|
@ -164,7 +164,7 @@ namespace Aurora::Threading
|
|||||||
return cb();
|
return cb();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool YieldPollNs(bool permitMultipleContextSwitches, AuUInt64 timeoutNs, PollCallback_cb cb)
|
AUKN_SYM bool YieldPollNs(bool permitMultipleContextSwitches, AuUInt64 timeoutNs, PollCallback_cb cb)
|
||||||
{
|
{
|
||||||
AuUInt64 time = Time::CurrentInternalClockNS();
|
AuUInt64 time = Time::CurrentInternalClockNS();
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ namespace Aurora::Threading
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool YieldPoll(bool permitMultipleContextSwitches, AuUInt64 timeoutMs, PollCallback_cb cb)
|
AUKN_SYM bool YieldPoll(bool permitMultipleContextSwitches, AuUInt64 timeoutMs, PollCallback_cb cb)
|
||||||
{
|
{
|
||||||
AuUInt64 time = Time::CurrentInternalClockNS();
|
AuUInt64 time = Time::CurrentInternalClockNS();
|
||||||
AuUInt64 timeoutNs = timeoutMs ? (time + (timeoutMs * 1000000)) : 0;
|
AuUInt64 timeoutNs = timeoutMs ? (time + (timeoutMs * 1000000)) : 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user