Flutter Engine
The Flutter Engine
Public Member Functions | Friends | List of all members
dart::SafepointMonitorLocker Class Reference

#include <lockers.h>

Inheritance diagram for dart::SafepointMonitorLocker:
dart::ValueObject

Public Member Functions

 SafepointMonitorLocker (Monitor *monitor)
 
virtual ~SafepointMonitorLocker ()
 
Monitor::WaitResult Wait (int64_t millis=Monitor::kNoTimeout)
 
void NotifyAll ()
 
- Public Member Functions inherited from dart::ValueObject
 ValueObject ()
 
 ~ValueObject ()
 

Friends

class SafepointMonitorUnlockScope
 

Detailed Description

Definition at line 260 of file lockers.h.

Constructor & Destructor Documentation

◆ SafepointMonitorLocker()

dart::SafepointMonitorLocker::SafepointMonitorLocker ( Monitor monitor)
inlineexplicit

Definition at line 262 of file lockers.h.

262 : monitor_(monitor) {
263 AcquireLock();
264 }

◆ ~SafepointMonitorLocker()

virtual dart::SafepointMonitorLocker::~SafepointMonitorLocker ( )
inlinevirtual

Definition at line 265 of file lockers.h.

265{ ReleaseLock(); }

Member Function Documentation

◆ NotifyAll()

void dart::SafepointMonitorLocker::NotifyAll ( )
inline

Definition at line 269 of file lockers.h.

269{ monitor_->NotifyAll(); }

◆ Wait()

Monitor::WaitResult dart::SafepointMonitorLocker::Wait ( int64_t  millis = Monitor::kNoTimeout)

Definition at line 77 of file lockers.cc.

77 {
78 Thread* thread = Thread::Current();
79 if (thread != nullptr) {
81 {
82 TransitionVMToBlocked transition(thread);
83 result = monitor_->Wait(millis);
84 }
85 return result;
86 } else {
87 return monitor_->Wait(millis);
88 }
89}
static Thread * Current()
Definition: thread.h:362
GAsyncResult * result

Friends And Related Function Documentation

◆ SafepointMonitorUnlockScope

friend class SafepointMonitorUnlockScope
friend

Definition at line 272 of file lockers.h.


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