mirror of
https://github.com/LibreOffice/online.git
synced 2025-08-16 17:42:05 +00:00
The other isCorrectThread() should be active only in the debug build too.
Change-Id: Ieadb7e14f70752f5cfb2fd9ee569b56fb39d528b
This commit is contained in:
@ -295,6 +295,7 @@ public:
|
||||
/// Are we running in either shutdown, or the polling thread.
|
||||
bool isCorrectThread() const
|
||||
{
|
||||
#if ENABLE_DEBUG
|
||||
// 0 owner means detached and can be invoked by any thread.
|
||||
if (_owner != std::thread::id(0) && std::this_thread::get_id() != _owner)
|
||||
LOG_WRN("Incorrect thread affinity for " << _name << ". Expected: 0x" << std::hex <<
|
||||
@ -302,6 +303,9 @@ public:
|
||||
std::hex << std::this_thread::get_id() << std::dec << ", stop: " << _stop);
|
||||
|
||||
return _stop || _owner == std::thread::id(0) || std::this_thread::get_id() == _owner;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
/// Poll the sockets for available data to read or buffer to write.
|
||||
|
Reference in New Issue
Block a user