}
void keepAliveRelease() override {
- if (inRunningEventBaseThread()) {
- loopKeepAliveCount_--;
- } else {
- add([=] { loopKeepAliveCount_--; });
+ if (!inRunningEventBaseThread()) {
+ return add([=] { keepAliveRelease(); });
}
+ loopKeepAliveCount_--;
}
private:
}
void keepAliveRelease() override {
- if (!getEventBase().inRunningEventBaseThread()) {
- return getEventBase().add([=] { keepAliveRelease(); });
+ if (!inRunningEventBaseThread()) {
+ return add([=] { keepAliveRelease(); });
}
if (loopKeepAliveCountAtomic_.load()) {
loopKeepAliveCount_ += loopKeepAliveCountAtomic_.exchange(0);