| 428 | }; |
| 429 | |
| 430 | inline LockedMessageWindow getSharedMessageWindow (bool recreateIfWrongThread = false) |
| 431 | { |
| 432 | static std::unique_ptr<MessageWindow> window; |
| 433 | static std::mutex lock; |
| 434 | |
| 435 | std::unique_lock<std::mutex> l (lock); |
| 436 | |
| 437 | if (window == nullptr || (recreateIfWrongThread && window->threadID != GetCurrentThreadId())) |
| 438 | window = std::make_unique<MessageWindow>(); |
| 439 | |
| 440 | return LockedMessageWindow { *window, std::move (l) }; |
| 441 | } |
| 442 | |
| 443 | inline void initialise() |
| 444 | { |
no outgoing calls
no test coverage detected