Alexey Serbin has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/23289


Change subject: [rpc] make Messenger::ShutdownInternal() safer
......................................................................

[rpc] make Messenger::ShutdownInternal() safer

Unless otherwise specified, all standard library objects that have been
moved from are placed in a "valid but unspecified state" [1], so only
functions without preconditions can be safely called on them.

The 'rpc_services_' and 'acceptor_pools_' member fields of the Messenger
class can be accessed after Messenger::ShutdownInternal() has been
called.  In this context, it's much more straightforward to leave all
the fields in a well-defined state without digging into implementation
details of various compilers and trying to clarify on type of operations
being invoked on those fields when a Messenger object has already been
shut down, but isn't destroyed yet.

[1] https://en.cppreference.com/w/cpp/utility/move.html

Change-Id: If4950ec4ef2edb41296f0f46f2341b53068a9497
---
M src/kudu/rpc/messenger.cc
1 file changed, 3 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/89/23289/1
--
To view, visit http://gerrit.cloudera.org:8080/23289
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If4950ec4ef2edb41296f0f46f2341b53068a9497
Gerrit-Change-Number: 23289
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <[email protected]>

Reply via email to