Add support for flushing microtasks in dart_engine.h
Also add a sample for calling Dart functions which return/accept futures. Change-Id: I932d0577709f4e068ccd3212797751ecb347c4f9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408281 Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>
This commit is contained in:
committed by
Commit Queue
parent
a6f06e8c9f
commit
51ea42537a
@@ -109,6 +109,17 @@ typedef void (*DartEngine_HandleMessageErrorCallback)(
|
||||
DART_EXPORT void DartEngine_SetHandleMessageErrorCallback(
|
||||
DartEngine_HandleMessageErrorCallback handle_message_error_callback);
|
||||
|
||||
/**
|
||||
* Drains the microtasks queue. Requires to be an active isolate.
|
||||
*
|
||||
* Normally the microtasks queue is drained after handling each
|
||||
* isolate message, but when the engine calls into Dart, it might be
|
||||
* required to manually drain the microtasks queue.
|
||||
*
|
||||
* \return Dart_Handle invocation result.
|
||||
*/
|
||||
DART_EXPORT Dart_Handle DartEngine_DrainMicrotasksQueue();
|
||||
|
||||
/**
|
||||
* Handles a single message for an isolate.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user