Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
dart::StateMachineTask::Data Struct Reference
Inheritance diagram for dart::StateMachineTask::Data:
dart::CheckinTask::Data

Public Member Functions

 Data (IsolateGroup *isolate_group)
 
void WaitUntil (intptr_t target_state)
 
void MarkAndNotify (intptr_t target_state)
 
void AssertIsIn (intptr_t expected_state)
 
void AssertIsNotIn (intptr_t expected_state)
 
bool IsIn (intptr_t expected_state)
 

Public Attributes

intptr_t state = kInitialized
 
IsolateGroupisolate_group_
 

Detailed Description

Definition at line 32 of file safepoint_test.cc.

Constructor & Destructor Documentation

◆ Data()

dart::StateMachineTask::Data::Data ( IsolateGroup isolate_group)
inlineexplicit

Definition at line 33 of file safepoint_test.cc.

34 : isolate_group_(isolate_group) {}

Member Function Documentation

◆ AssertIsIn()

void dart::StateMachineTask::Data::AssertIsIn ( intptr_t  expected_state)
inline

Definition at line 47 of file safepoint_test.cc.

47 {
48 MonitorLocker ml(&monitor_);
49 EXPECT_EQ(expected_state, state);
50 }

◆ AssertIsNotIn()

void dart::StateMachineTask::Data::AssertIsNotIn ( intptr_t  expected_state)
inline

Definition at line 51 of file safepoint_test.cc.

51 {
52 MonitorLocker ml(&monitor_);
53 EXPECT_NE(expected_state, state);
54 }

◆ IsIn()

bool dart::StateMachineTask::Data::IsIn ( intptr_t  expected_state)
inline

Definition at line 55 of file safepoint_test.cc.

55 {
56 MonitorLocker ml(&monitor_);
57 return expected_state == state;
58 }

◆ MarkAndNotify()

void dart::StateMachineTask::Data::MarkAndNotify ( intptr_t  target_state)
inline

Definition at line 42 of file safepoint_test.cc.

42 {
43 MonitorLocker ml(&monitor_);
44 state = target_state;
45 ml.Notify();
46 }

◆ WaitUntil()

void dart::StateMachineTask::Data::WaitUntil ( intptr_t  target_state)
inline

Definition at line 36 of file safepoint_test.cc.

36 {
37 MonitorLocker ml(&monitor_);
38 while (state != target_state) {
39 ml.Wait();
40 }
41 }

Member Data Documentation

◆ isolate_group_

IsolateGroup* dart::StateMachineTask::Data::isolate_group_

Definition at line 61 of file safepoint_test.cc.

◆ state

intptr_t dart::StateMachineTask::Data::state = kInitialized

Definition at line 60 of file safepoint_test.cc.


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