| 161 | } |
| 162 | |
| 163 | BOOL MountPointManager::wait_all_and_destroy() { |
| 164 | |
| 165 | HANDLE handles[MAXIMUM_WAIT_OBJECTS]; |
| 166 | wstring mountpoints[MAXIMUM_WAIT_OBJECTS]; |
| 167 | |
| 168 | int count = 0; |
| 169 | for (auto &it : m_tdatas) { |
| 170 | mountpoints[count] = it.first; |
| 171 | handles[count++] = it.second->hThread; |
| 172 | if (count == MAXIMUM_WAIT_OBJECTS) { |
| 173 | if (!wait_multiple_and_destroy(count, handles, mountpoints)) |
| 174 | return FALSE; |
| 175 | count = 0; |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | if (count) |
| 180 | return wait_multiple_and_destroy(count, handles, mountpoints); |
| 181 | else |
| 182 | return TRUE; |
| 183 | |
| 184 | } |
| 185 | |
| 186 | bool MountPointManager::find(const WCHAR * mountpoint, wstring & mpstr) const |
| 187 | { |
no outgoing calls
no test coverage detected