| 301 | } |
| 302 | |
| 303 | void DataStorageBridge::DispatchTask(std::function<void()> task) const |
| 304 | { |
| 305 | auto dispatcher = m_Dispatcher.Lock(); |
| 306 | |
| 307 | if (dispatcher.IsNotNull() && !dispatcher->IsDispatchThread()) |
| 308 | { |
| 309 | dispatcher->Execute(std::move(task)); |
| 310 | } |
| 311 | else |
| 312 | { |
| 313 | task(); |
| 314 | } |
| 315 | } |
| 316 | |
| 317 | template <typename R> |
| 318 | R DataStorageBridge::DispatchTask(std::function<R()> task) const |
nothing calls this directly
no test coverage detected