named_thread: implement "default" event loop

Fixup "sleepy" thread at startup on Windows.
Permit threads which lack operator()() overload.
This commit is contained in:
Nekotekina 2021-02-24 13:56:02 +03:00
parent 29e7eda887
commit 3aaa0172d5
3 changed files with 22 additions and 8 deletions

View file

@ -377,8 +377,11 @@ int main(int argc, char** argv)
}
#endif
// Initialize TSC freq (in case it isn't)
static_cast<void>(utils::get_tsc_freq());
// Initialize thread pool finalizer (on first use)
named_thread("", []{})();
static_cast<void>(named_thread("", [](int) {}));
static std::unique_ptr<logs::listener> log_file;
{