| 254 | } |
| 255 | |
| 256 | int 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 | |
| 274 | int aePostFunction(aeEventLoop *eventLoop, aePostFunctionTokenProc *proc, StorageToken *token) |
| 275 | { |
no outgoing calls
no test coverage detected