Use yield() where possible

Replaced calls of this_thread::sleep_* with this_thread::yield(), which
yields the thread to the OS' scheduler.
This commit is contained in:
Lion Kortlepel
2022-02-03 18:57:52 +01:00
parent 29f8d29e33
commit 754053e73f
4 changed files with 18 additions and 23 deletions

View File

@@ -149,6 +149,7 @@ public:
void CancelEventTimers(const std::string& EventName, TLuaStateId StateId);
sol::state_view GetStateForPlugin(const fs::path& PluginPath);
TLuaStateId GetStateIDForPlugin(const fs::path& PluginPath);
void AddResultToCheck(const std::shared_ptr<TLuaResult>& Result);
static constexpr const char* BeamMPFnNotFoundError = "BEAMMP_FN_NOT_FOUND";