Home
last modified time | relevance | path

Searched refs:WorkerThread (Results 1 – 25 of 150) sorted by relevance

123456

/external/cronet/tot/base/task/thread_pool/
Dworker_thread.cc49 constexpr TimeDelta WorkerThread::Delegate::kPurgeThreadCacheIdleDelay;
51 WorkerThread::ThreadLabel WorkerThread::Delegate::GetThreadLabel() const { in GetThreadLabel()
52 return WorkerThread::ThreadLabel::POOLED; in GetThreadLabel()
55 bool WorkerThread::Delegate::TimedWait(TimeDelta timeout) { in TimedWait()
59 void WorkerThread::Delegate::WaitForWork() { in WaitForWork()
102 bool WorkerThread::Delegate::IsDelayFirstWorkerSleepEnabled() { in IsDelayFirstWorkerSleepEnabled()
109 TimeDelta WorkerThread::Delegate::GetSleepDurationBeforePurge(TimeTicks now) { in GetSleepDurationBeforePurge()
149 WorkerThread::WorkerThread(ThreadType thread_type_hint, in WorkerThread() function in base::internal::WorkerThread
173 bool WorkerThread::Start( in Start()
221 void WorkerThread::Destroy() { in Destroy()
[all …]
Dworker_thread.h41 class BASE_EXPORT WorkerThread : public RefCountedThreadSafe<WorkerThread>,
68 virtual void OnMainEntry(WorkerThread* worker) = 0;
71 virtual RegisteredTaskSource GetWork(WorkerThread* worker) = 0;
78 WorkerThread* worker) = 0;
92 virtual void OnMainExit(WorkerThread* worker) {} in OnMainExit()
109 friend WorkerThread;
147 WorkerThread(ThreadType thread_type_hint,
154 WorkerThread(const WorkerThread&) = delete;
155 WorkerThread& operator=(const WorkerThread&) = delete;
215 friend class RefCountedThreadSafe<WorkerThread>;
[all …]
Dworker_thread_set.h18 class WorkerThread; variable
28 bool operator()(const WorkerThread* a, const WorkerThread* b) const;
40 void Insert(WorkerThread* worker);
45 WorkerThread* Take();
48 WorkerThread* Peek() const;
51 bool Contains(const WorkerThread* worker) const;
55 void Remove(const WorkerThread* worker);
64 std::set<raw_ptr<WorkerThread, SetExperimental>, Compare> set_;
Dworker_thread_set.cc14 bool WorkerThreadSet::Compare::operator()(const WorkerThread* a, in operator ()()
15 const WorkerThread* b) const { in operator ()()
23 void WorkerThreadSet::Insert(WorkerThread* worker) { in Insert()
33 WorkerThread* WorkerThreadSet::Take() { in Take()
36 WorkerThread* const worker = *set_.begin(); in Take()
43 WorkerThread* WorkerThreadSet::Peek() const { in Peek()
49 bool WorkerThreadSet::Contains(const WorkerThread* worker) const { in Contains()
50 return set_.count(const_cast<WorkerThread*>(worker)) > 0; in Contains()
53 void WorkerThreadSet::Remove(const WorkerThread* worker) { in Remove()
56 auto it = set_.find(const_cast<WorkerThread*>(worker)); in Remove()
Dthread_group_impl.cc51 void ScheduleWakeUp(scoped_refptr<WorkerThread> worker) { in ScheduleWakeUp()
56 absl::InlinedVector<scoped_refptr<WorkerThread>, 2> workers_to_wake_up_;
59 class ThreadGroupImpl::WorkerDelegate : public WorkerThread::Delegate,
69 void OnMainEntry(WorkerThread* worker) override;
70 void OnMainExit(WorkerThread* worker) override;
71 RegisteredTaskSource GetWork(WorkerThread* worker) override;
73 WorkerThread* worker) override;
111 WorkerThread* worker)
118 WorkerThread* worker)
123 WorkerThread* worker)
[all …]
Dworker_thread_unittest.cc61 class WorkerThreadDefaultDelegate : public WorkerThread::Delegate {
69 WorkerThread::ThreadLabel GetThreadLabel() const override { in GetThreadLabel()
70 return WorkerThread::ThreadLabel::DEDICATED; in GetThreadLabel()
72 void OnMainEntry(WorkerThread* worker) override {} in OnMainEntry()
73 RegisteredTaskSource GetWork(WorkerThread* worker) override { in GetWork()
77 WorkerThread* worker) override { in SwapProcessedTask()
116 worker_ = MakeRefCounted<WorkerThread>( in SetUp()
169 scoped_refptr<WorkerThread> worker_;
188 void OnMainEntry(WorkerThread* worker) override { in OnMainEntry()
200 RegisteredTaskSource GetWork(WorkerThread* worker) override { in GetWork()
[all …]
Dpooled_single_thread_task_runner_manager.cc111 class WorkerThreadDelegate : public WorkerThread::Delegate {
114 WorkerThread::ThreadLabel thread_label, in WorkerThreadDelegate()
122 void set_worker(WorkerThread* worker) { in set_worker()
127 WorkerThread::ThreadLabel GetThreadLabel() const final { in GetThreadLabel()
131 void OnMainEntry(WorkerThread* /* worker */) override { in OnMainEntry() argument
136 RegisteredTaskSource GetWork(WorkerThread* worker) override { in GetWork()
152 WorkerThread* worker) override { in SwapProcessedTask()
227 void OnMainExit(WorkerThread* /* worker */) override {} in OnMainExit() argument
248 RegisteredTaskSource GetWorkLockRequired(WorkerThread* worker) in GetWorkLockRequired()
294 const WorkerThread::ThreadLabel thread_label_;
[all …]
Dworker_thread_set_unittest.cc21 class MockWorkerThreadDelegate : public WorkerThread::Delegate {
23 WorkerThread::ThreadLabel GetThreadLabel() const override { in GetThreadLabel()
24 return WorkerThread::ThreadLabel::DEDICATED; in GetThreadLabel()
26 void OnMainEntry(WorkerThread* worker) override {} in OnMainEntry()
27 RegisteredTaskSource GetWork(WorkerThread* worker) override { in GetWork()
31 WorkerThread* worker) override { in SwapProcessedTask()
41 worker_a_ = MakeRefCounted<WorkerThread>( in SetUp()
45 worker_b_ = MakeRefCounted<WorkerThread>( in SetUp()
49 worker_c_ = MakeRefCounted<WorkerThread>( in SetUp()
59 scoped_refptr<WorkerThread> worker_a_;
[all …]
Dpooled_single_thread_task_runner_manager.h31 class WorkerThread; variable
120 WorkerThread* CreateAndRegisterWorkerThread(
126 WorkerThread*& GetSharedWorkerThreadForTraits(const TaskTraits& traits);
128 void UnregisterWorkerThread(WorkerThread* worker);
142 std::vector<scoped_refptr<WorkerThread>> workers_ GUARDED_BY(lock_);
150 WorkerThread* shared_worker_threads_[ENVIRONMENT_COUNT]
154 WorkerThread* shared_com_worker_threads_
/external/cronet/stable/base/task/thread_pool/
Dworker_thread.cc49 constexpr TimeDelta WorkerThread::Delegate::kPurgeThreadCacheIdleDelay;
51 WorkerThread::ThreadLabel WorkerThread::Delegate::GetThreadLabel() const { in GetThreadLabel()
52 return WorkerThread::ThreadLabel::POOLED; in GetThreadLabel()
55 bool WorkerThread::Delegate::TimedWait(TimeDelta timeout) { in TimedWait()
59 void WorkerThread::Delegate::WaitForWork() { in WaitForWork()
102 bool WorkerThread::Delegate::IsDelayFirstWorkerSleepEnabled() { in IsDelayFirstWorkerSleepEnabled()
109 TimeDelta WorkerThread::Delegate::GetSleepDurationBeforePurge(TimeTicks now) { in GetSleepDurationBeforePurge()
149 WorkerThread::WorkerThread(ThreadType thread_type_hint, in WorkerThread() function in base::internal::WorkerThread
173 bool WorkerThread::Start( in Start()
221 void WorkerThread::Destroy() { in Destroy()
[all …]
Dworker_thread.h41 class BASE_EXPORT WorkerThread : public RefCountedThreadSafe<WorkerThread>,
68 virtual void OnMainEntry(WorkerThread* worker) = 0;
71 virtual RegisteredTaskSource GetWork(WorkerThread* worker) = 0;
78 WorkerThread* worker) = 0;
92 virtual void OnMainExit(WorkerThread* worker) {} in OnMainExit()
109 friend WorkerThread;
147 WorkerThread(ThreadType thread_type_hint,
154 WorkerThread(const WorkerThread&) = delete;
155 WorkerThread& operator=(const WorkerThread&) = delete;
215 friend class RefCountedThreadSafe<WorkerThread>;
[all …]
Dworker_thread_set.h18 class WorkerThread; variable
28 bool operator()(const WorkerThread* a, const WorkerThread* b) const;
40 void Insert(WorkerThread* worker);
45 WorkerThread* Take();
48 WorkerThread* Peek() const;
51 bool Contains(const WorkerThread* worker) const;
55 void Remove(const WorkerThread* worker);
64 std::set<raw_ptr<WorkerThread, SetExperimental>, Compare> set_;
Dworker_thread_set.cc14 bool WorkerThreadSet::Compare::operator()(const WorkerThread* a, in operator ()()
15 const WorkerThread* b) const { in operator ()()
23 void WorkerThreadSet::Insert(WorkerThread* worker) { in Insert()
33 WorkerThread* WorkerThreadSet::Take() { in Take()
36 WorkerThread* const worker = *set_.begin(); in Take()
43 WorkerThread* WorkerThreadSet::Peek() const { in Peek()
49 bool WorkerThreadSet::Contains(const WorkerThread* worker) const { in Contains()
50 return set_.count(const_cast<WorkerThread*>(worker)) > 0; in Contains()
53 void WorkerThreadSet::Remove(const WorkerThread* worker) { in Remove()
56 auto it = set_.find(const_cast<WorkerThread*>(worker)); in Remove()
Dthread_group_impl.cc51 void ScheduleWakeUp(scoped_refptr<WorkerThread> worker) { in ScheduleWakeUp()
56 absl::InlinedVector<scoped_refptr<WorkerThread>, 2> workers_to_wake_up_;
59 class ThreadGroupImpl::WorkerDelegate : public WorkerThread::Delegate,
69 void OnMainEntry(WorkerThread* worker) override;
70 void OnMainExit(WorkerThread* worker) override;
71 RegisteredTaskSource GetWork(WorkerThread* worker) override;
73 WorkerThread* worker) override;
111 WorkerThread* worker)
118 WorkerThread* worker)
123 WorkerThread* worker)
[all …]
Dworker_thread_unittest.cc61 class WorkerThreadDefaultDelegate : public WorkerThread::Delegate {
69 WorkerThread::ThreadLabel GetThreadLabel() const override { in GetThreadLabel()
70 return WorkerThread::ThreadLabel::DEDICATED; in GetThreadLabel()
72 void OnMainEntry(WorkerThread* worker) override {} in OnMainEntry()
73 RegisteredTaskSource GetWork(WorkerThread* worker) override { in GetWork()
77 WorkerThread* worker) override { in SwapProcessedTask()
116 worker_ = MakeRefCounted<WorkerThread>( in SetUp()
169 scoped_refptr<WorkerThread> worker_;
188 void OnMainEntry(WorkerThread* worker) override { in OnMainEntry()
200 RegisteredTaskSource GetWork(WorkerThread* worker) override { in GetWork()
[all …]
Dpooled_single_thread_task_runner_manager.cc111 class WorkerThreadDelegate : public WorkerThread::Delegate {
114 WorkerThread::ThreadLabel thread_label, in WorkerThreadDelegate()
122 void set_worker(WorkerThread* worker) { in set_worker()
127 WorkerThread::ThreadLabel GetThreadLabel() const final { in GetThreadLabel()
131 void OnMainEntry(WorkerThread* /* worker */) override { in OnMainEntry() argument
136 RegisteredTaskSource GetWork(WorkerThread* worker) override { in GetWork()
152 WorkerThread* worker) override { in SwapProcessedTask()
227 void OnMainExit(WorkerThread* /* worker */) override {} in OnMainExit() argument
248 RegisteredTaskSource GetWorkLockRequired(WorkerThread* worker) in GetWorkLockRequired()
294 const WorkerThread::ThreadLabel thread_label_;
[all …]
Dworker_thread_set_unittest.cc21 class MockWorkerThreadDelegate : public WorkerThread::Delegate {
23 WorkerThread::ThreadLabel GetThreadLabel() const override { in GetThreadLabel()
24 return WorkerThread::ThreadLabel::DEDICATED; in GetThreadLabel()
26 void OnMainEntry(WorkerThread* worker) override {} in OnMainEntry()
27 RegisteredTaskSource GetWork(WorkerThread* worker) override { in GetWork()
31 WorkerThread* worker) override { in SwapProcessedTask()
41 worker_a_ = MakeRefCounted<WorkerThread>( in SetUp()
45 worker_b_ = MakeRefCounted<WorkerThread>( in SetUp()
49 worker_c_ = MakeRefCounted<WorkerThread>( in SetUp()
59 scoped_refptr<WorkerThread> worker_a_;
[all …]
Dpooled_single_thread_task_runner_manager.h31 class WorkerThread; variable
120 WorkerThread* CreateAndRegisterWorkerThread(
126 WorkerThread*& GetSharedWorkerThreadForTraits(const TaskTraits& traits);
128 void UnregisterWorkerThread(WorkerThread* worker);
142 std::vector<scoped_refptr<WorkerThread>> workers_ GUARDED_BY(lock_);
150 WorkerThread* shared_worker_threads_[ENVIRONMENT_COUNT]
154 WorkerThread* shared_com_worker_threads_
/external/libgav1/src/utils/
Dthreadpool.cc81 std::unique_ptr<WorkerThread*[]> threads(new (std::nothrow) in Create()
82 WorkerThread*[num_threads]); in Create()
93 std::unique_ptr<WorkerThread*[]> threads, in ThreadPool()
124 class ThreadPool::WorkerThread : public Allocable { class in libgav1::ThreadPool
127 explicit WorkerThread(ThreadPool* pool);
130 WorkerThread(const WorkerThread&) = delete;
131 WorkerThread& operator=(const WorkerThread&) = delete;
135 ~WorkerThread() = default;
160 ThreadPool::WorkerThread::WorkerThread(ThreadPool* pool) : pool_(pool) {} in WorkerThread() function in libgav1::ThreadPool::WorkerThread
164 bool ThreadPool::WorkerThread::Start() { in Start()
[all …]
/external/tensorflow/tensorflow/compiler/xla/pjrt/
Dworker_thread.cc20 WorkerThread::WorkerThread(tensorflow::Env* env, const std::string& name) { in WorkerThread() function in xla::WorkerThread
25 WorkerThread::~WorkerThread() { in ~WorkerThread()
30 void WorkerThread::Schedule(std::function<void()> fn) { in Schedule()
36 bool WorkerThread::WorkAvailable() { return !work_queue_.empty(); } in WorkAvailable()
38 void WorkerThread::WorkLoop() { in WorkLoop()
43 mu_.Await(absl::Condition(this, &WorkerThread::WorkAvailable)); in WorkLoop()
/external/grpc-grpc/src/cpp/thread_manager/
Dthread_manager.cc34 ThreadManager::WorkerThread::WorkerThread(ThreadManager* thd_mgr) in WorkerThread() function in grpc::ThreadManager::WorkerThread
40 [](void* th) { static_cast<ThreadManager::WorkerThread*>(th)->Run(); }, in WorkerThread()
47 void ThreadManager::WorkerThread::Run() { in Run()
52 ThreadManager::WorkerThread::~WorkerThread() { in ~WorkerThread()
99 void ThreadManager::MarkAsCompleted(WorkerThread* thd) { in MarkAsCompleted()
118 std::list<WorkerThread*> completed_threads; in CleanupCompletedThreads()
144 WorkerThread* worker = new WorkerThread(this); in Initialize()
184 WorkerThread* worker = new WorkerThread(this); in MainWorkLoop()
/external/rust/android-crates-io/crates/grpcio-sys/grpc/src/cpp/thread_manager/
Dthread_manager.cc35 ThreadManager::WorkerThread::WorkerThread(ThreadManager* thd_mgr) in WorkerThread() function in grpc::ThreadManager::WorkerThread
41 [](void* th) { static_cast<ThreadManager::WorkerThread*>(th)->Run(); }, in WorkerThread()
48 void ThreadManager::WorkerThread::Run() { in Run()
53 ThreadManager::WorkerThread::~WorkerThread() { in ~WorkerThread()
100 void ThreadManager::MarkAsCompleted(WorkerThread* thd) { in MarkAsCompleted()
119 std::list<WorkerThread*> completed_threads; in CleanupCompletedThreads()
145 WorkerThread* worker = new WorkerThread(this); in Initialize()
185 WorkerThread* worker = new WorkerThread(this); in MainWorkLoop()
/external/exoplayer/tree_8e57d3715f9092d5ec54ebe2e538f34bfcc34479/library/datasource/src/main/java/com/google/android/exoplayer2/upstream/cache/
DCache.java19 import androidx.annotation.WorkerThread;
116 @WorkerThread
183 @WorkerThread
201 @WorkerThread
218 @WorkerThread
231 @WorkerThread
247 @WorkerThread
257 @WorkerThread
307 @WorkerThread
/external/exoplayer/tree_15dc86382f17a24a3e881e52e31a810c1ea44b49/library/datasource/src/main/java/com/google/android/exoplayer2/upstream/cache/
DCache.java19 import androidx.annotation.WorkerThread;
116 @WorkerThread
183 @WorkerThread
201 @WorkerThread
218 @WorkerThread
231 @WorkerThread
247 @WorkerThread
257 @WorkerThread
307 @WorkerThread
/external/rust/android-crates-io/crates/rayon-core/src/
Dregistry.rs210 if unsupported && WorkerThread::current().is_null() { in default_global_registry()
287 if !WorkerThread::current().is_null() { in new()
295 let worker_thread = Box::into_raw(Box::new(WorkerThread::from(thread))); in new()
298 WorkerThread::set_current(worker_thread); in new()
317 let worker_thread = WorkerThread::current(); in current()
332 let worker_thread = WorkerThread::current(); in current_num_threads()
342 pub(super) fn current_thread(&self) -> Option<&WorkerThread> { in current_thread() argument
344 let worker = WorkerThread::current().as_ref()?; in current_thread()
406 let worker_thread = WorkerThread::current(); in inject_or_push()
489 OP: FnOnce(&WorkerThread, bool) -> R + Send, in in_worker() argument
[all …]

123456