skia2/src/utils/SkThreadUtils.h
mtklein a1bde7d2e1 Remove SkThread::setProcessorAffinity()
It's only used by a couple unit tests.  We have other ways of getting
the same quality testing of our ref-count code now (e.g. TSAN).

BUG=skia:
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot

Review URL: https://codereview.chromium.org/1408213005
2015-10-20 11:05:06 -07:00

40 lines
728 B
C++

/*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkThreadUtils_DEFINED
#define SkThreadUtils_DEFINED
#include "SkTypes.h"
class SkThread : SkNoncopyable {
public:
typedef void (*entryPointProc)(void*);
SkThread(entryPointProc entryPoint, void* data = nullptr);
/**
* Non-virtual, do not subclass.
*/
~SkThread();
/**
* Starts the thread. Returns false if the thread could not be started.
*/
bool start();
/**
* Waits for the thread to finish.
* If the thread has not started, returns immediately.
*/
void join();
private:
void* fData;
};
#endif