| 378 | EnqueuePacketWait<FlushPacket_>(); |
| 379 | } |
| 380 | bool Channel::TryFlushFor(std::chrono::milliseconds timeout) noexcept |
| 381 | { |
| 382 | try { |
| 383 | // avoid self-deadlock if a flush attempt occurs from within the worker thread |
| 384 | if (IsWorkerThread()) { |
| 385 | ChannelInternal_::Flush(); |
| 386 | return true; |
| 387 | } |
| 388 | return EnqueuePacketWaitFor<FlushPacket_>(timeout); |
| 389 | } |
| 390 | catch (...) { |
| 391 | pmlog_panic_("Exception thrown in Channel::TryFlushFor"); |
| 392 | } |
| 393 | return false; |
| 394 | } |
| 395 | void Channel::AttachComponent(std::shared_ptr<IChannelComponent> pComponent, std::string tag) |
| 396 | { |
| 397 | if (pComponent) { |