diff options
| author | robot-piglet <[email protected]> | 2023-11-22 11:00:23 +0300 | 
|---|---|---|
| committer | robot-piglet <[email protected]> | 2023-11-22 12:13:22 +0300 | 
| commit | 66db06bedee4e8d3c539464ab85d8413c3c0b539 (patch) | |
| tree | 0e0d2a6aeb36c45793c22bd9cefc200ddc095a5a /library/cpp/neh | |
| parent | 4fbe60cb421e9b6db948035286ce602e1c2627c8 (diff) | |
Intermediate changes
Diffstat (limited to 'library/cpp/neh')
| -rw-r--r-- | library/cpp/neh/asio/asio.cpp | 4 | ||||
| -rw-r--r-- | library/cpp/neh/asio/asio.h | 3 | ||||
| -rw-r--r-- | library/cpp/neh/asio/io_service_impl.h | 4 | 
3 files changed, 11 insertions, 0 deletions
| diff --git a/library/cpp/neh/asio/asio.cpp b/library/cpp/neh/asio/asio.cpp index 8b6cf383eac..e10f62f575d 100644 --- a/library/cpp/neh/asio/asio.cpp +++ b/library/cpp/neh/asio/asio.cpp @@ -35,6 +35,10 @@ namespace NAsio {          Impl_->Run();      } +    size_t TIOService::GetOpQueueSize() noexcept { +        return Impl_->GetOpQueueSize(); +    } +      void TIOService::Post(TCompletionHandler h) {          Impl_->Post(std::move(h));      } diff --git a/library/cpp/neh/asio/asio.h b/library/cpp/neh/asio/asio.h index a902d663cfc..87c3c6d5258 100644 --- a/library/cpp/neh/asio/asio.h +++ b/library/cpp/neh/asio/asio.h @@ -105,6 +105,9 @@ namespace NAsio {          void Post(TCompletionHandler); //call handler in Run() thread-executor          void Abort();                  //in Run() all exist async i/o operations + timers receive error = ECANCELED, Run() exited +        // not const since internal queue is lockfree and needs to increment and decrement its reference counters +        size_t GetOpQueueSize() noexcept; +          //counterpart boost::asio::io_service::work          class TWork {          public: diff --git a/library/cpp/neh/asio/io_service_impl.h b/library/cpp/neh/asio/io_service_impl.h index 687b5576e88..e1768df6d9c 100644 --- a/library/cpp/neh/asio/io_service_impl.h +++ b/library/cpp/neh/asio/io_service_impl.h @@ -492,6 +492,10 @@ namespace NAsio {              }          } +        inline size_t GetOpQueueSize() noexcept { +            return OpQueue_.Size(); +        } +          void SyncRegisterTimer(TTimer* t) {              Timers_.insert(t);          } | 
