Flutter Engine
 
Loading...
Searching...
No Matches
fml::testing::TaskQueueWrapper Struct Reference

A mock task queue NOT calling MessageLoop->Run() in thread. More...

Public Member Functions

 TaskQueueWrapper ()
 
 ~TaskQueueWrapper ()
 
fml::TaskQueueId GetTaskQueueId () const
 

Public Attributes

fml::MessageLooploop = nullptr
 
fml::AutoResetWaitableEvent latch
 The waiter for message loop initialized ok.
 
fml::AutoResetWaitableEvent term
 The waiter for thread finished.
 
std::thread thread
 

Detailed Description

A mock task queue NOT calling MessageLoop->Run() in thread.

Definition at line 23 of file raster_thread_merger_unittests.cc.

Constructor & Destructor Documentation

◆ TaskQueueWrapper()

fml::testing::TaskQueueWrapper::TaskQueueWrapper ( )
inline

◆ ~TaskQueueWrapper()

fml::testing::TaskQueueWrapper::~TaskQueueWrapper ( )
inline

Definition at line 48 of file raster_thread_merger_unittests.cc.

48 {
49 term.Signal();
50 thread.join();
51 }

References fml::AutoResetWaitableEvent::Signal(), term, and thread.

Member Function Documentation

◆ GetTaskQueueId()

Member Data Documentation

◆ latch

fml::AutoResetWaitableEvent fml::testing::TaskQueueWrapper::latch

The waiter for message loop initialized ok.

Definition at line 27 of file raster_thread_merger_unittests.cc.

Referenced by TaskQueueWrapper().

◆ loop

fml::MessageLoop* fml::testing::TaskQueueWrapper::loop = nullptr

Definition at line 24 of file raster_thread_merger_unittests.cc.

Referenced by GetTaskQueueId(), and TaskQueueWrapper().

◆ term

fml::AutoResetWaitableEvent fml::testing::TaskQueueWrapper::term

The waiter for thread finished.

Definition at line 30 of file raster_thread_merger_unittests.cc.

Referenced by TaskQueueWrapper(), and ~TaskQueueWrapper().

◆ thread

std::thread fml::testing::TaskQueueWrapper::thread

This field must below latch and term member, because cpp standard reference: non-static data members are initialized in the order they were declared in the class definition

Definition at line 36 of file raster_thread_merger_unittests.cc.

Referenced by ~TaskQueueWrapper().


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