aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-08-09 21:06:07 +0200
committerStefan Boberg <[email protected]>2021-08-09 21:06:07 +0200
commit73885c99a1164de8275d85f70488b8a5186935b1 (patch)
tree8a4728a33d5eda313a07d4437ea4a1ba23e6c16e
parentChanged naming scheme for lifecycle events. Always create shutdown events (no... (diff)
downloadzen-73885c99a1164de8275d85f70488b8a5186935b1.tar.xz
zen-73885c99a1164de8275d85f70488b8a5186935b1.zip
Fixed Event move assignment
-rw-r--r--zencore/include/zencore/thread.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/zencore/include/zencore/thread.h b/zencore/include/zencore/thread.h
index 4b5267a29..30d0c0897 100644
--- a/zencore/include/zencore/thread.h
+++ b/zencore/include/zencore/thread.h
@@ -78,8 +78,7 @@ public:
inline Event& operator=(Event&& Rhs)
{
- m_EventHandle = Rhs.m_EventHandle;
- Rhs.m_EventHandle = nullptr;
+ std::swap(m_EventHandle, Rhs.m_EventHandle);
return *this;
}
@@ -135,6 +134,7 @@ public:
ZENCORE_API bool IsValid() const;
ZENCORE_API bool Wait(int TimeoutMs = -1);
ZENCORE_API void Terminate(int ExitCode);
+ ZENCORE_API void Reset();
inline int Pid() const { return m_Pid; }
private: