| 141 | |
| 142 | template <typename T> |
| 143 | T wtRunSynchronouslyOnUiThread(std::function<T()> callback) |
| 144 | { |
| 145 | T result; |
| 146 | hex::TaskManager::doLaterOnce( |
| 147 | [&]() |
| 148 | { |
| 149 | result = callback(); |
| 150 | uiThreadSemaphore.release(); |
| 151 | }); |
| 152 | uiThreadSemaphore.acquire(); |
| 153 | return result; |
| 154 | } |
| 155 | |
| 156 | template <> |
| 157 | void wtRunSynchronouslyOnUiThread(std::function<void()> callback) |
no outgoing calls
no test coverage detected