DASH Media Packaging SDK
Main Page
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerator
media
base
closure_thread.cc
1
// Copyright 2014 Google Inc. All rights reserved.
2
//
3
// Use of this source code is governed by a BSD-style
4
// license that can be found in the LICENSE file or at
5
// https://developers.google.com/open-source/licenses/bsd
6
7
#include "packager/media/base/closure_thread.h"
8
9
namespace
edash_packager {
10
namespace
media {
11
12
ClosureThread::ClosureThread
(
13
const
std::string& name_prefix,
14
const
base::Closure& task)
15
: base::SimpleThread(name_prefix), task_(task) {}
16
17
ClosureThread::~ClosureThread
() {
18
if
(HasBeenStarted() && !HasBeenJoined())
19
Join();
20
}
21
22
void
ClosureThread::Run
() { task_.Run(); }
23
24
}
// namespace media
25
}
// namespace edash_packager
edash_packager::media::ClosureThread::ClosureThread
ClosureThread(const std::string &name_prefix, const base::Closure &task)
Definition:
closure_thread.cc:12
edash_packager::media::ClosureThread::~ClosureThread
~ClosureThread() override
The destructor calls Join automatically if it is not yet joined.
Definition:
closure_thread.cc:17
edash_packager::media::ClosureThread::Run
void Run() override
SimpleThread implementation overrides.
Definition:
closure_thread.cc:22
Generated on Mon Jan 4 2016 23:24:38 for DASH Media Packaging SDK by
1.8.6