| 290 | } |
| 291 | |
| 292 | void Execute() override |
| 293 | { |
| 294 | CASPAR_LOG(trace) << "[cef_task] executing task"; |
| 295 | |
| 296 | try { |
| 297 | function_(); |
| 298 | promise_.set_value(); |
| 299 | CASPAR_LOG(trace) << "[cef_task] task succeeded"; |
| 300 | } catch (...) { |
| 301 | promise_.set_exception(std::current_exception()); |
| 302 | CASPAR_LOG(warning) << "[cef_task] task failed"; |
| 303 | } |
| 304 | } |
| 305 | |
| 306 | std::future<void> future() { return promise_.get_future(); } |
| 307 |
no test coverage detected