aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/vespa/storageframework/generic/thread/thread.cpp
blob: 06c080f11c81aa6c963d75da1aa7e29fad5d6a8d (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 Vespa.ai. 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();
}

}