Flutter Engine
The Flutter Engine
dart_microtask_queue.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef LIB_TONIC_DART_MICROTASK_QUEUE_H_
6#define LIB_TONIC_DART_MICROTASK_QUEUE_H_
7
8#include <vector>
9
10#include "third_party/dart/runtime/include/dart_api.h"
13
14namespace tonic {
15
17 public:
20
21 static void StartForCurrentThread();
22
24
26 void RunMicrotasks();
27 void Destroy();
28
29 bool HasMicrotasks() const { return !queue_.empty(); }
30
32
33 private:
34 typedef std::vector<DartPersistentValue> MicrotaskQueue;
35
36 DartErrorHandleType last_error_;
37 MicrotaskQueue queue_;
38};
39
40} // namespace tonic
41
42#endif // LIB_TONIC_DART_MICROTASK_QUEUE_H_
void ScheduleMicrotask(Dart_Handle callback)
static DartMicrotaskQueue * GetForCurrentThread()
DartErrorHandleType GetLastError()
struct _Dart_Handle * Dart_Handle
Definition: dart_api.h:258
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
DartErrorHandleType
Definition: dart_error.h:67