mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-02-16 10:41:01 +00:00
Lua: Fix threading related crash
This commit is contained in:
@@ -8,6 +8,11 @@ public:
|
||||
IThreaded()
|
||||
// invokes operator() on this object
|
||||
: mThread() { }
|
||||
~IThreaded() noexcept {
|
||||
if (mThread.joinable()) {
|
||||
mThread.join();
|
||||
}
|
||||
}
|
||||
|
||||
virtual void Start() final {
|
||||
mThread = std::thread([this] { (*this)(); });
|
||||
|
||||
Reference in New Issue
Block a user