MCPcopy Create free account
hub / github.com/alibaba/async_simple / checkin

Method checkin

async_simple/executors/SimpleExecutor.h:72–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70 }
71
72 bool checkin(Func func, Context ctx, ScheduleOptions opts) override {
73 int64_t id = reinterpret_cast<int64_t>(ctx);
74 auto prompt =
75 _pool.getCurrentId() == (id & (~kContextMask)) && opts.prompt;
76 if (prompt) {
77 func();
78 return true;
79 }
80 return _pool.scheduleById(std::move(func), id & (~kContextMask)) ==
81 util::ThreadPool::ERROR_NONE;
82 }
83
84 IOExecutor* getIOExecutor() override { return &_ioExecutor; }
85

Callers

nothing calls this directly

Calls 3

getCurrentIdMethod · 0.80
scheduleByIdMethod · 0.80
funcClass · 0.50

Tested by

no test coverage detected