Flutter Engine
The Flutter Engine
Instance Methods | Properties | List of all members
FlutterThreadSynchronizerTestScaffold Class Reference
Inheritance diagram for FlutterThreadSynchronizerTestScaffold:

Instance Methods

(nullable instancetype) - init
 
(void) - dispatchMainTask:
 
(void) - dispatchRenderTask:
 
(void) - joinMain
 
(void) - joinRender
 

Properties

FlutterThreadSynchronizersynchronizer
 

Detailed Description

Definition at line 10 of file FlutterThreadSynchronizerTest.mm.

Method Documentation

◆ dispatchMainTask:

- (void) dispatchMainTask: (nonnull void(^)())  task

Definition at line 28 of file FlutterThreadSynchronizerTest.mm.

43 :(nonnull void (^)())task {
44 dispatch_async(_mainQueue, task);
45}

◆ dispatchRenderTask:

- (void) dispatchRenderTask: (nonnull void(^)())  task

Definition at line 28 of file FlutterThreadSynchronizerTest.mm.

47 :(nonnull void (^)())task {
48 dispatch_async(_renderQueue, task);
49}
dispatch_queue_t _renderQueue

◆ init

- (nullable instancetype) init

Definition at line 28 of file FlutterThreadSynchronizerTest.mm.

33 {
34 self = [super init];
35 if (self != nil) {
36 _mainQueue = dispatch_queue_create("MAIN", DISPATCH_QUEUE_SERIAL);
37 _renderQueue = dispatch_queue_create("RENDER", DISPATCH_QUEUE_SERIAL);
38 _synchronizer = [[FlutterThreadSynchronizer alloc] initWithMainQueue:_mainQueue];
39 }
40 return self;
41}
FlutterThreadSynchronizer * _synchronizer

◆ joinMain

- (void) joinMain

Definition at line 28 of file FlutterThreadSynchronizerTest.mm.

51 {
53 fml::AutoResetWaitableEvent* pLatch = &latch;
54 dispatch_async(_mainQueue, ^{
55 pLatch->Signal();
56 });
57 latch.Wait();
58}

◆ joinRender

- (void) joinRender

Definition at line 28 of file FlutterThreadSynchronizerTest.mm.

60 {
62 fml::AutoResetWaitableEvent* pLatch = &latch;
63 dispatch_async(_renderQueue, ^{
64 pLatch->Signal();
65 });
66 latch.Wait();
67}

Property Documentation

◆ synchronizer

- (FlutterThreadSynchronizer*) synchronizer
readnonatomicassign

Definition at line 12 of file FlutterThreadSynchronizerTest.mm.


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