| 20 | } |
| 21 | |
| 22 | static void* execute_invoke_closure(void* args) { |
| 23 | auto param = |
| 24 | reinterpret_cast<::std::tuple<ClosureContext*, Closure::Callback*>*>( |
| 25 | args); |
| 26 | auto closure = ::std::get<0>(*param); |
| 27 | auto callback = ::std::get<1>(*param); |
| 28 | closure->run(callback); |
| 29 | delete param; |
| 30 | return NULL; |
| 31 | } |
| 32 | |
| 33 | BthreadGraphExecutor& BthreadGraphExecutor::instance() { |
| 34 | static BthreadGraphExecutor executor; |