| 56 | |
| 57 | template<class callable_type> |
| 58 | timer_ptr make_timer_impl(size_t due_time, |
| 59 | size_t frequency, |
| 60 | std::shared_ptr<concurrencpp::executor> executor, |
| 61 | bool is_oneshot, |
| 62 | callable_type&& callable) { |
| 63 | assert(static_cast<bool>(executor)); |
| 64 | |
| 65 | using decayed_type = typename std::decay_t<callable_type>; |
| 66 | |
| 67 | auto timer_state = std::make_shared<details::timer_state<decayed_type>>(due_time, |
| 68 | frequency, |
| 69 | std::move(executor), |
| 70 | weak_from_this(), |
| 71 | is_oneshot, |
| 72 | std::forward<callable_type>(callable)); |
| 73 | { |
| 74 | std::unique_lock<std::mutex> lock(m_lock); |
| 75 | add_timer(lock, timer_state); |
| 76 | } |
| 77 | |
| 78 | return timer_state; |
| 79 | } |
| 80 | |
| 81 | void work_loop(); |
| 82 |
no outgoing calls
no test coverage detected