| 40 | } |
| 41 | |
| 42 | int 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 | |
| 56 | int BthreadGraphExecutor::run(ClosureContext* closure, |
| 57 | Closure::Callback* callback) noexcept { |
no outgoing calls
no test coverage detected