From dc76aa34c7f34fdd6393a98e3a9af6a8256b980f Mon Sep 17 00:00:00 2001 From: "Lasse R.H. Nielsen" Date: Fri, 18 May 2018 09:33:27 +0000 Subject: [PATCH] Stop using a port to keep the isolate alive in async_helper. Addresses issue #33067. Bug: http://dartbug.com/33067 Change-Id: Id9e60e930a8f289a51063f609e13fb998f6907c3 Reviewed-on: https://dart-review.googlesource.com/55662 Commit-Queue: Lasse R.H. Nielsen Reviewed-by: Vijay Menon --- pkg/async_helper/lib/async_helper.dart | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/pkg/async_helper/lib/async_helper.dart b/pkg/async_helper/lib/async_helper.dart index 1c9c10e5da2..46360f93046 100644 --- a/pkg/async_helper/lib/async_helper.dart +++ b/pkg/async_helper/lib/async_helper.dart @@ -23,14 +23,7 @@ library async_helper; -// TODO(kustermann): This is problematic because we rely on a working -// 'dart:isolate' (i.e. it is in particular problematic with dart2js). -// It would be nice if we could use a different mechanism for different -// runtimes. -import 'dart:isolate'; - bool _initialized = false; -ReceivePort _port = null; int _asyncLevel = 0; Exception _buildException(String msg) { @@ -49,7 +42,6 @@ void asyncStart([int count = 1]) { if (!_initialized) { print('unittest-suite-wait-for-done'); _initialized = true; - _port = new ReceivePort(); } _asyncLevel += count; } @@ -66,8 +58,6 @@ void asyncEnd() { } _asyncLevel--; if (_asyncLevel == 0) { - _port.close(); - _port = null; print('unittest-suite-success'); } }