| 27 | |
| 28 | |
| 29 | struct TFunc: public IThreadFactory::IThreadAble { |
| 30 | inline TFunc(TServices* parent) |
| 31 | : Parent(parent) |
| 32 | { |
| 33 | } |
| 34 | |
| 35 | void DoExecute() override { |
| 36 | TThread::SetCurrentThreadName("NehTFunc"); |
| 37 | TVersionedServiceMap mp; |
| 38 | while (true) { |
| 39 | IRequestRef req = Parent->RQ_->Next(); |
| 40 | |
| 41 | if (!req) { |
| 42 | break; |
| 43 | } |
| 44 | |
| 45 | Parent->ServeRequest(mp, req); |
| 46 | } |
| 47 | |
| 48 | Parent->RQ_->Schedule(nullptr); |
| 49 | } |
| 50 | |
| 51 | TServices* Parent; |
| 52 | }; |
| 53 | |
| 54 | public: |
| 55 | inline TServices() |
no outgoing calls