| Flutter macOS Embedder |

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
FlutterThreadSynchronizer * | synchronizer

## Detailed Description

Definition at line 10 of file FlutterThreadSynchronizerTest.mm.

## Method Documentation

## ◆ dispatchMainTask:

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

Definition at line 41 of file FlutterThreadSynchronizerTest.mm.

41 :(nonnull void (^)())task {
42 dispatch_async(_mainQueue, task);
43 }

Referenced by TEST().

## ◆ dispatchRenderTask:

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

Definition at line 45 of file FlutterThreadSynchronizerTest.mm.

45 :(nonnull void (^)())task {
46 dispatch_async(_renderQueue, task);
47 }

References _renderQueue.

Referenced by TEST().

## ◆ init

- (nullable instancetype) init |  |  |

Definition at line 31 of file FlutterThreadSynchronizerTest.mm.

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

References _renderQueue, and _synchronizer.

## ◆ joinMain

- (void) joinMain |  |  |

Definition at line 49 of file FlutterThreadSynchronizerTest.mm.

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

Referenced by TEST().

## ◆ joinRender

- (void) joinRender |  |  |

Definition at line 58 of file FlutterThreadSynchronizerTest.mm.

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

References _renderQueue.

Referenced by TEST().

## Property Documentation

## ◆ synchronizer

- (FlutterThreadSynchronizer*) synchronizer
| read nonatomic assign

Definition at line 12 of file FlutterThreadSynchronizerTest.mm.

Referenced by TEST().

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

- shell/platform/darwin/macos/framework/Source/FlutterThreadSynchronizerTest.mm

FlutterThreadSynchronizer
Definition: FlutterThreadSynchronizer.h:18
_synchronizer
FlutterThreadSynchronizer * _synchronizer
Definition: FlutterThreadSynchronizerTest.mm:28
_renderQueue
dispatch_queue_t _renderQueue
Definition: FlutterThreadSynchronizerTest.mm:25