MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / process_one_task

Method process_one_task

imperative/python/src/helper.h:80–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78 Queue() : mgb::AsyncQueueSC<std::function<void(void)>, Queue>(0) {}
79
80 void process_one_task(Task& f) {
81 if (!Py_IsInitialized())
82 return;
83 pybind11::gil_scoped_acquire _;
84 f();
85 }
86
87 void on_async_queue_worker_thread_start() override {
88 mgb::sys::set_thread_name("py_task_worker");

Callers

nothing calls this directly

Calls 1

fFunction · 0.50

Tested by

no test coverage detected