MCPcopy Create free account
hub / github.com/baidu/babylon / run

Method run

example/use-with-bthread/bthread_graph_executor.cpp:42–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42int BthreadGraphExecutor::run(GraphVertex* vertex,
43 GraphVertexClosure&& closure) noexcept {
44 bthread_t th;
45 auto param = new ::std::tuple<GraphVertex*, GraphVertexClosure>(
46 vertex, ::std::move(closure));
47 if (0 != bthread_start_background(&th, NULL, execute_invoke_vertex, param)) {
48 LOG(WARNING) << "start bthread to run vertex failed";
49 closure = ::std::move(::std::get<1>(*param));
50 delete param;
51 return -1;
52 }
53 return 0;
54}
55
56int BthreadGraphExecutor::run(ClosureContext* closure,
57 Closure::Callback* callback) noexcept {

Callers 4

execute_invoke_vertexFunction · 0.45
execute_invoke_closureFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected