| 85 | } |
| 86 | |
| 87 | std::pair<bool, bool> ToggleQueue::is_queued(ObjectInstance* obj) const { |
| 88 | g_assert(owns_lock() && "Unsafe access to queue"); |
| 89 | bool has_toggle_down = find_operation_locked(obj, DOWN) != q.end(); |
| 90 | bool has_toggle_up = find_operation_locked(obj, UP) != q.end(); |
| 91 | return {has_toggle_down, has_toggle_up}; |
| 92 | } |
| 93 | |
| 94 | std::pair<bool, bool> ToggleQueue::cancel(ObjectInstance* obj) { |
| 95 | debug("cancel", obj); |
no test coverage detected