| 84 | } |
| 85 | |
| 86 | void GuiExecutor::Cancel(const ScheduledCall& call) |
| 87 | { |
| 88 | unsigned id = GetId(call); |
| 89 | if (IsExecutorThread()) |
| 90 | { |
| 91 | m_scheduledCalls.Remove(id); |
| 92 | ResetTimer(); |
| 93 | } |
| 94 | else |
| 95 | { |
| 96 | Call([this, id]() |
| 97 | { |
| 98 | m_scheduledCalls.Remove(id); |
| 99 | ResetTimer(); |
| 100 | }); |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | bool GuiExecutor::IsExecutorThread() const |
| 105 | { |