diff options
author | leo <leo@yandex-team.ru> | 2022-02-10 16:46:40 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:40 +0300 |
commit | 980edcd3304699edf9d4e4d6a656e585028e2a72 (patch) | |
tree | 139f47f3911484ae9af0eb347b1a88bd6c4bb35f /library/cpp/messagebus/messqueue.cpp | |
parent | b036a557f285146e5e35d4213e29a094ab907bcf (diff) | |
download | ydb-980edcd3304699edf9d4e4d6a656e585028e2a72.tar.gz |
Restoring authorship annotation for <leo@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/messagebus/messqueue.cpp')
-rw-r--r-- | library/cpp/messagebus/messqueue.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/library/cpp/messagebus/messqueue.cpp b/library/cpp/messagebus/messqueue.cpp index 3474d62705..5de2c1a12c 100644 --- a/library/cpp/messagebus/messqueue.cpp +++ b/library/cpp/messagebus/messqueue.cpp @@ -24,17 +24,17 @@ TBusMessageQueuePtr NBus::CreateMessageQueue(const TBusQueueConfig& config, TBus TBusMessageQueuePtr NBus::CreateMessageQueue(const TBusQueueConfig& config, const char* name) { return CreateMessageQueue(config, new TBusLocator, name); -} - +} + TBusMessageQueuePtr NBus::CreateMessageQueue(TExecutorPtr executor, const char* name) { return CreateMessageQueue(TBusQueueConfig(), executor, new TBusLocator, name); } TBusMessageQueuePtr NBus::CreateMessageQueue(const char* name) { - TBusQueueConfig config; + TBusQueueConfig config; return CreateMessageQueue(config, name); -} - +} + namespace { TBusQueueConfig QueueConfigFillDefaults(const TBusQueueConfig& orig, const TString& name) { TBusQueueConfig patched = orig; @@ -148,8 +148,8 @@ TBusServerSessionPtr TBusMessageQueue::CreateDestination(TBusProtocol* proto, IB } catch (...) { Y_FAIL("create destination failure: %s", CurrentExceptionMessage().c_str()); } -} - +} + TBusServerSessionPtr TBusMessageQueue::CreateDestination(TBusProtocol* proto, IBusServerHandler* handler, const TBusServerSessionConfig& config, const TVector<TBindResult>& bindTo, const TString& name) { TRemoteServerSessionPtr session(new TRemoteServerSession(this, proto, handler, config, name)); try { @@ -179,15 +179,15 @@ void TBusMessageQueue::Destroy(TBusSession* session) { void TBusMessageQueue::DestroyAllSessions() { TList<TIntrusivePtr<TBusSessionImpl>> sessions; - { - TGuard<TMutex> scope(Lock); + { + TGuard<TMutex> scope(Lock); sessions = Sessions; - } - + } + for (auto& session : sessions) { Y_VERIFY(session->IsDown(), "Session must be shut down prior to queue shutdown"); } -} +} void TBusMessageQueue::Schedule(IScheduleItemAutoPtr i) { Scheduler.Schedule(i); |