| 424 | } |
| 425 | |
| 426 | void SourceManager::removeSource(int32_t handle) |
| 427 | { |
| 428 | // Remove the source from the handle-to-source map. |
| 429 | { |
| 430 | std::lock_guard<std::mutex> lock(mSourceMutex); |
| 431 | |
| 432 | if (mSources.find(handle) != mSources.end()) |
| 433 | { |
| 434 | iplSourceRelease(&mSources[handle]); |
| 435 | mSources.erase(handle); |
| 436 | } |
| 437 | } |
| 438 | |
| 439 | // Mark the handle as free. |
| 440 | { |
| 441 | std::lock_guard<std::mutex> lock(mHandleMutex); |
| 442 | |
| 443 | mFreeHandles.push(handle); |
| 444 | } |
| 445 | } |
| 446 | |
| 447 | IPLSource SourceManager::getSource(int32_t handle) |
| 448 | { |
no test coverage detected