blob: 86d1c9ff32ff3be7ed2bee83dd0dc558a7393c21 [file] [log] [blame]
* Copyright (c) 2017, the Dart project authors. Please see the AUTHORS
* file for details. All rights reserved. Use of this source code is governed
* by a BSD-style license that can be found in the LICENSE file.
* @assertion void resume(
* Capability resumeCapability
* )
* Resumes a paused isolate.
* Sends a message to an isolate requesting that it ends a pause that was
* requested using the resumeCapability.
* @description Check that event queue is processed after call to resume()
* @author
import "dart:isolate";
import "../../../Utils/expect.dart";
import "IsolateUtil.dart";
test() async {
ReceivePort receivePort = new ReceivePort();
EchoServer server = await EchoServer.spawn(receivePort.sendPort);
Expect.equals("hello", await"hello"));
Capability resumeCapability = server.isolate.pause();
Expect.equals("timeout", await"paused", ONE_SECOND, "timeout"));
Expect.equals("server", await"server"));
await server.stop();
main() {