aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/vespa/storageframework/generic/thread/thread.cpp
blob: 388ac93a9b587c91f0daa9d82b7d1cb92deb9f3b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "thread.h"

namespace storage::framework {

void
Thread::interruptAndJoin()
{
    interrupt();
    join();
}

void
Thread::interruptAndJoin(std::condition_variable &cv)
{
    interrupt();
    cv.notify_all();
    join();
}

}