review rework

This commit is contained in:
a00817524 authored and John Sully committed 2023-09-17 19:06:00 -04:00
1 parent cf13e7b594
commit 337eb297a1
1 file changed
+5 -3
+5 -3
View File
@@ -183,9 +183,11 @@ void aeProcessCmd(aeEventLoop *eventLoop, int fd, void *, int )
}
case AE_ASYNC_OP::PostAsynDBFunction:
{ //added to support async api IStorage
std::unique_lock<decltype(g_lock)> ulock(g_lock, std::defer_lock);
if (cmd.fLock)
ulock.lock();
if (cmd.fLock && !ulock.owns_lock()) {
g_forkLock.releaseRead();
ulock.lock();
g_forkLock.acquireRead();
}
((aePostFunctionTokenProc*)cmd.tproc)(eventLoop,(StorageToken*)cmd.clientData);
break;
}