MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / aePostFunction

Function aePostFunction

src/ae.cpp:256–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254}
255
256int aePostFunction(aeEventLoop *eventLoop, aePostFunctionProc *proc, void *arg)
257{
258 if (eventLoop == g_eventLoopThisThread)
259 {
260 proc(arg);
261 return AE_OK;
262 }
263 aeCommand cmd = {};
264 cmd.op = AE_ASYNC_OP::PostFunction;
265 cmd.proc = proc;
266 cmd.clientData = arg;
267 cmd.fLock = true;
268 auto size = write(eventLoop->fdCmdWrite, &cmd, sizeof(cmd));
269 if (size != sizeof(cmd))
270 return AE_ERR;
271 return AE_OK;
272}
273
274int aePostFunction(aeEventLoop *eventLoop, aePostFunctionTokenProc *proc, StorageToken *token)
275{

Callers 15

keysCommandFunction · 0.85
freeClusterLinkFunction · 0.85
clusterSendMessageFunction · 0.85
rdbSaveToSlavesSocketsFunction · 0.85
undoConnectWithMasterFunction · 0.85
activeExpireCycleExpireFunction · 0.85
postFunctionMethod · 0.85
asyncCommandMethod · 0.85
prepareForShutdownFunction · 0.85
RM_CreateTimerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected