We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 731eb6b commit 313931aCopy full SHA for 313931a
yt/cpp/mapreduce/client/client.cpp
@@ -1516,10 +1516,14 @@ TYtPoller& TClient::GetYtPoller()
1516
1517
void TClient::Shutdown()
1518
{
1519
- auto g = Guard(Lock_);
1520
-
1521
- if (!Shutdown_.exchange(true) && YtPoller_) {
1522
- YtPoller_->Stop();
+ std::unique_ptr<TYtPoller> poller;
+ with_lock(Lock_) {
+ if (!Shutdown_.exchange(true) && YtPoller_) {
+ poller = std::move(YtPoller_);
1523
+ }
1524
1525
+ if (poller) {
1526
+ poller->Stop();
1527
}
1528
1529
0 commit comments