summaryrefslogtreecommitdiffhomepage
path: root/Private/NewKit/LockDelegate.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'Private/NewKit/LockDelegate.hpp')
-rw-r--r--Private/NewKit/LockDelegate.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Private/NewKit/LockDelegate.hpp b/Private/NewKit/LockDelegate.hpp
index d43d8562..74cd22e5 100644
--- a/Private/NewKit/LockDelegate.hpp
+++ b/Private/NewKit/LockDelegate.hpp
@@ -14,7 +14,9 @@
namespace HCore
{
-template <Size N>
+/// @brief Locking delegate class, hangs until limit.
+/// @tparam N
+template <SizeT N>
class LockDelegate final
{
public:
@@ -24,6 +26,7 @@ class LockDelegate final
explicit LockDelegate(Boolean *expr)
{
auto spin = 0U;
+
while (spin != N)
{
if (*expr)
@@ -46,6 +49,7 @@ class LockDelegate final
{
return m_LockStatus[kLockDone] == kLockDone;
}
+
bool HasTimedOut()
{
return m_LockStatus[kLockTimedOut] != kLockTimedOut;