MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / dbconsumer_poll

Function dbconsumer_poll

lua/sp.c:806–820  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

804}
805
806static int dbconsumer_poll(Lua L)
807{
808 dbconsumer_t *q = luaL_checkudata(L, 1, dbtypes.dbconsumer);
809 lua_Number arg = luaL_checknumber(L, 2);
810 lua_Integer delay_ms; // ms
811 lua_number2integer(delay_ms, arg);
812 if (delay_ms < 0) {
813 delay_ms = 0;
814 }
815 int rc = dbq_poll(L, q, delay_ms);
816 if (rc >= 0) {
817 return rc;
818 }
819 return luaL_error(L, getsp(L)->error);
820}
821
822static inline int push_and_return(Lua L, int rc)
823{

Callers

nothing calls this directly

Calls 4

luaL_checkudataFunction · 0.85
luaL_checknumberFunction · 0.85
dbq_pollFunction · 0.85
luaL_errorFunction · 0.85

Tested by

no test coverage detected