aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/vespa/storage/common/message_guard.cpp
blob: 335b2c3d4d7b3517424e8f1e545d918463666f19 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "message_guard.h"

namespace storage {

MessageGuard::~MessageGuard() {
    _lock.unlock();
    for (uint32_t i = 0; i < messagesUp.size(); i++) {
        _messageSender.sendUp(messagesUp[i]);
    }
    for (uint32_t i = 0; i < messagesDown.size(); i++) {
        _messageSender.sendDown(messagesDown[i]);
    }
}

}