Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::FuzzTask Class Reference
Inheritance diagram for dart::FuzzTask:
dart::ThreadPool::Task dart::IntrusiveDListEntry< Task >

Public Member Functions

 FuzzTask (intptr_t num_rounds, ThreadBarrier *barrier, uint64_t seed)
 
virtual void Run ()
 
- Public Member Functions inherited from dart::ThreadPool::Task
virtual ~Task ()
 
virtual void Run ()=0
 
- Public Member Functions inherited from dart::IntrusiveDListEntry< Task >
 IntrusiveDListEntry ()
 
 ~IntrusiveDListEntry ()
 

Additional Inherited Members

- Protected Member Functions inherited from dart::ThreadPool::Task
 Task ()
 

Detailed Description

Definition at line 13 of file thread_barrier_test.cc.

Constructor & Destructor Documentation

◆ FuzzTask()

dart::FuzzTask::FuzzTask ( intptr_t  num_rounds,
ThreadBarrier barrier,
uint64_t  seed 
)
inline

Definition at line 15 of file thread_barrier_test.cc.

16 : num_rounds_(num_rounds), barrier_(barrier), rng_(seed) {}

Member Function Documentation

◆ Run()

virtual void dart::FuzzTask::Run ( )
inlinevirtual

Implements dart::ThreadPool::Task.

Definition at line 18 of file thread_barrier_test.cc.

18 {
19 for (intptr_t i = 0; i < num_rounds_; ++i) {
20 RandomSleep();
21 barrier_->Sync();
22 }
23 barrier_->Release();
24 }

The documentation for this class was generated from the following file: