move Json* to Util, add Random, RandomRange, RandomIntRange, catch

errors in TPluginMonitor
This commit is contained in:
Lion Kortlepel
2022-03-18 01:52:31 +01:00
parent 39db1a5e42
commit c1e216957b
2 changed files with 60 additions and 37 deletions

View File

@@ -10,6 +10,7 @@
#include <memory>
#include <mutex>
#include <queue>
#include <random>
#include <set>
#include <toml11/toml.hpp>
#include <unordered_map>
@@ -89,7 +90,7 @@ public:
std::unique_lock Lock(mResultsToCheckMutex);
return mResultsToCheck.size();
}
size_t GetLuaStateCount() {
std::unique_lock Lock(mLuaStatesMutex);
return mLuaStates.size();
@@ -213,6 +214,8 @@ private:
sol::state_view mStateView { mState };
std::queue<fs::path> mPaths;
std::recursive_mutex mPathsMutex;
std::mt19937 mMersenneTwister;
std::uniform_real_distribution<double> mUniformRealDistribution01;
};
struct TimedEvent {