better socket reactor wake up (#3647)

* better socket reactor wake up

* Remove documentation comment from source file

Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com>
This commit is contained in:
JackyWoo 2022-06-29 18:15:09 +08:00 committed by GitHub
parent 5d7a1016c2
commit 3f124bd250
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,7 +138,11 @@ void SocketReactor::stop()
void SocketReactor::wakeUp()
{
if (_pThread) _pThread->wakeUp();
if (_pThread && _pThread != Thread::current())
{
_pThread->wakeUp();
_pollSet.wakeUp();
}
}