#import <FlutterRunLoop.h>
Instance Methods | |
(void) | - performBlock: |
(void) | - performBlock:afterDelay: |
(void) | - pollFlutterMessagesOnce |
Class Methods | |
(void) | + ensureMainLoopInitialized |
(FlutterRunLoop *) | + mainRunLoop |
Interface for scheduling tasks on the run loop.
Main difference between using FlutterRunLoop
to schedule tasks compared to dispatch_async
or [NSRunLoop performBlock:]
is that FlutterRunLoop
schedules the task in both common run loop mode and a private run loop mode, which allows it to run in mode where it only processes Flutter messages ([FlutterRunLoop pollFlutterMessagesOnce]
).
Definition at line 15 of file FlutterRunLoop.h.
+ (void) ensureMainLoopInitialized |
Ensures that the FlutterRunLoop
for main thread is initialized. Only needs to be called once and must be called on the main thread.
Definition at line 31 of file FlutterRunLoop.mm.
Referenced by FlutterDisplayLinkTest::SetUp(), and FlutterVSyncWaiterTest::SetUp().
+ (FlutterRunLoop *) mainRunLoop |
Returns the FlutterRunLoop
for the main thread.
Definition at line 31 of file FlutterRunLoop.mm.
Referenced by TEST().
- (void) performBlock: | (void(^)(void)) | block |
Schedules a block to be executed on the main thread.
Definition at line 31 of file FlutterRunLoop.mm.
- (void) performBlock: | (void(^)(void)) | block | |
afterDelay: | (NSTimeInterval) | delay | |
Schedules a block to be executed on the main thread after a delay.
Definition at line 31 of file FlutterRunLoop.mm.
- (void) pollFlutterMessagesOnce |
Executes single iteration of the run loop in the mode where only Flutter messages are processed.
Definition at line 31 of file FlutterRunLoop.mm.
Referenced by TEST_F().