Flutter Engine
The Flutter Engine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
dart::StateMachineTask Class Referenceabstract
Inheritance diagram for dart::StateMachineTask:
dart::ThreadPool::Task dart::IntrusiveDListEntry< Task > dart::CheckinTask dart::DeoptTask dart::GcWithoutDeoptTask dart::LongDeoptTask dart::ReloadTask dart::StressTask dart::WaiterTask

Classes

struct  Data
 

Public Types

enum  State {
  kInitialized = 0 , kEntered , kPleaseExit , kExited ,
  kNext
}
 

Public Member Functions

 StateMachineTask (std::shared_ptr< Data > data)
 
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 ()
 

Protected Member Functions

virtual void RunInternal ()=0
 
- Protected Member Functions inherited from dart::ThreadPool::Task
 Task ()
 

Protected Attributes

std::shared_ptr< Datadata_
 
Threadthread_ = nullptr
 

Detailed Description

Definition at line 23 of file safepoint_test.cc.

Member Enumeration Documentation

◆ State

Enumerator
kInitialized 
kEntered 
kPleaseExit 
kExited 
kNext 

Definition at line 25 of file safepoint_test.cc.

Constructor & Destructor Documentation

◆ StateMachineTask()

dart::StateMachineTask::StateMachineTask ( std::shared_ptr< Data data)
inlineexplicit

Definition at line 67 of file safepoint_test.cc.

68 : data_(std::move(data)) {}
std::shared_ptr< Data > data_
static int8_t data[kExtLength]

Member Function Documentation

◆ Run()

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

Implements dart::ThreadPool::Task.

Definition at line 70 of file safepoint_test.cc.

70 {
71 const bool kBypassSafepoint = false;
73 Thread::kUnknownTask, kBypassSafepoint);
75 data_->MarkAndNotify(kEntered);
77 data_->WaitUntil(kPleaseExit);
78 Thread::ExitIsolateGroupAsHelper(kBypassSafepoint);
79 thread_ = nullptr;
80 data_->MarkAndNotify(kExited);
81 }
virtual void RunInternal()=0
@ kUnknownTask
Definition: thread.h:346
static Thread * Current()
Definition: thread.h:362
static void ExitIsolateGroupAsHelper(bool bypass_safepoint)
Definition: thread.cc:499
static bool EnterIsolateGroupAsHelper(IsolateGroup *isolate_group, TaskKind kind, bool bypass_safepoint)
Definition: thread.cc:481

◆ RunInternal()

virtual void dart::StateMachineTask::RunInternal ( )
protectedpure virtual

Member Data Documentation

◆ data_

std::shared_ptr<Data> dart::StateMachineTask::data_
protected

Definition at line 86 of file safepoint_test.cc.

◆ thread_

Thread* dart::StateMachineTask::thread_ = nullptr
protected

Definition at line 87 of file safepoint_test.cc.


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