Fixes for iosource::Manager for deadlocks during shutdown

This commit is contained in:
Tim Wojtulewicz 2022-05-16 16:28:36 -07:00 committed by Tim Wojtulewicz
parent 6acb626ece
commit d06387d4d3
2 changed files with 6 additions and 6 deletions

View file

@ -43,10 +43,10 @@ void Manager::WakeupHandler::Process()
flare.Extinguish(); flare.Extinguish();
} }
void Manager::WakeupHandler::Ping(const std::string& where) void Manager::WakeupHandler::Ping(std::string_view where)
{ {
DBG_LOG(DBG_MAINLOOP, "Pinging WakeupHandler from %s", where.c_str()); DBG_LOG(DBG_MAINLOOP, "Pinging WakeupHandler from %s", where.data());
flare.Fire(); flare.Fire(true);
} }
Manager::Manager() Manager::Manager()
@ -98,7 +98,7 @@ void Manager::RemoveAll()
dont_counts = sources.size(); dont_counts = sources.size();
} }
void Manager::Wakeup(const std::string& where) void Manager::Wakeup(std::string_view where)
{ {
if ( wakeup ) if ( wakeup )
wakeup->Ping(where); wakeup->Ping(where);

View file

@ -144,7 +144,7 @@ public:
* is called during RegisterFd and UnregisterFd since those methods cause * is called during RegisterFd and UnregisterFd since those methods cause
* changes to the active set of file descriptors. * changes to the active set of file descriptors.
*/ */
void Wakeup(const std::string& where); void Wakeup(std::string_view where);
private: private:
/** /**
@ -186,7 +186,7 @@ private:
* @param where a string denoting where this ping was called from. Used * @param where a string denoting where this ping was called from. Used
* for debugging output. * for debugging output.
*/ */
void Ping(const std::string& where); void Ping(std::string_view where);
// IOSource API methods // IOSource API methods
void Process() override; void Process() override;