| 461 | |
| 462 | inline void Add(IObjectInQueue* obj) { |
| 463 | with_lock (Mutex_) { |
| 464 | while (Obj_ != nullptr) { |
| 465 | CondFree_.Wait(Mutex_); |
| 466 | } |
| 467 | |
| 468 | if (Free_ == 0) { |
| 469 | AddThreadNoLock(); |
| 470 | } |
| 471 | |
| 472 | Obj_ = obj; |
| 473 | |
| 474 | Y_ENSURE_EX(!AllDone_, TThreadPoolException() << TStringBuf("adding to a stopped queue")); |
| 475 | } |
| 476 | |
| 477 | CondReady_.Signal(); |
| 478 | } |
nothing calls this directly
no test coverage detected