diff options
author | ralphl@chromium.org <ralphl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-28 17:21:23 +0000 |
---|---|---|
committer | ralphl@chromium.org <ralphl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-28 17:21:23 +0000 |
commit | b026f4aeb159244e47d3b55c5faad7bb3247fd55 (patch) | |
tree | efda81548664ea009160ded8588904185b384ca4 /base/thread.h | |
parent | abc659b6d95cf197c2b96a544351a667e8b96f95 (diff) | |
download | chromium_src-b026f4aeb159244e47d3b55c5faad7bb3247fd55.zip chromium_src-b026f4aeb159244e47d3b55c5faad7bb3247fd55.tar.gz chromium_src-b026f4aeb159244e47d3b55c5faad7bb3247fd55.tar.bz2 |
Implementation of Pipeline and FilterHost interfaces. This is a large change, but all of the objects are interrelated.
I am also checking in a basic unit test that creates pipeline,
and the data source hangs during initialization. The test sleeps one second and then stops the pipeline.
Andrew has already done a first pass on this, and the code has come largely from our working experimental branch.
Review URL: http://codereview.chromium.org/18546
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8805 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/thread.h')
-rw-r--r-- | base/thread.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/base/thread.h b/base/thread.h index 13aa35b..5a51bec 100644 --- a/base/thread.h +++ b/base/thread.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -22,7 +22,7 @@ class Thread : PlatformThread::Delegate { struct Options { // Specifies the type of message loop that will be allocated on the thread. MessageLoop::Type message_loop_type; - + // Specifies the maximum stack size that the thread is allowed to use. // This does not necessarily correspond to the thread's initial stack size. // A value of 0 indicates that the default maximum should be used. @@ -104,6 +104,10 @@ class Thread : PlatformThread::Delegate { // The thread ID. PlatformThreadId thread_id() const { return thread_id_; } + // Returns true if the thread has been started, and not yet stopped. + // When a thread is running, the thread_id_ is non-zero. + bool IsRunning() const { return thread_id_ != 0; } + protected: // Called just prior to starting the message loop virtual void Init() {} |