| 97 | |
| 98 | template <class T> |
| 99 | static inline void WaitForMultipleObj(TWaitQueue& hndl, const TInstant& deadLine, T& func) { |
| 100 | do { |
| 101 | TWaitHandle* ret = nullptr; |
| 102 | |
| 103 | if (hndl.Dequeue(&ret)) { |
| 104 | do { |
| 105 | func(ret); |
| 106 | } while (hndl.Dequeue(&ret)); |
| 107 | |
| 108 | return; |
| 109 | } |
| 110 | } while (hndl.Wait(deadLine)); |
| 111 | } |
| 112 | |
| 113 | struct TSignalled { |
| 114 | inline TSignalled() |
no test coverage detected