MCPcopy Create free account
hub / github.com/ceph/ceph / submit_to

Method submit_to

src/msg/async/Event.h:248–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246 public:
247 template <typename func>
248 void submit_to(int i, func &&f, bool always_async = false) {
249 ceph_assert(i < MAX_EVENTCENTER && global_centers);
250 EventCenter *c = global_centers->centers[i];
251 ceph_assert(c);
252 if (always_async) {
253 C_submit_event<func> *event = new C_submit_event<func>(std::move(f), true);
254 c->dispatch_event_external(event);
255 } else if (c->in_thread()) {
256 f();
257 return;
258 } else {
259 C_submit_event<func> event(std::move(f), false);
260 c->dispatch_event_external(&event);
261 event.wait();
262 }
263 };
264};
265
266#endif

Callers 12

bindMethod · 0.80
startMethod · 0.80
stopMethod · 0.80
discardMethod · 0.80
flushMethod · 0.80
reset_recv_stateMethod · 0.80
reuse_connectionMethod · 0.80
reset_recv_stateMethod · 0.80
replaceMethod · 0.80
cleanupMethod · 0.80
set_accept_fdMethod · 0.80

Calls 4

fFunction · 0.85
in_threadMethod · 0.80
waitMethod · 0.45

Tested by

no test coverage detected