Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(665)

Unified Diff: sdk/lib/isolate/base.dart

Issue 11824053: Implement port equality on SendPortSync (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 80 char fix Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tests/html/js_interop_2_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/isolate/base.dart
diff --git a/sdk/lib/isolate/base.dart b/sdk/lib/isolate/base.dart
index c6c36e016f68bcb721a4669c31de0c8e14e2a5da..73b550cff4cb825e1b40fd1f5dce01dae4968a27 100644
--- a/sdk/lib/isolate/base.dart
+++ b/sdk/lib/isolate/base.dart
@@ -139,11 +139,30 @@ abstract class ReceivePort {
}
-// TODO(kasperl): Document this.
+/**
+ * [SendPortSync]s are created from [ReceivePortSync]s. Any message sent through
+ * a [SendPortSync] is delivered to its respective [ReceivePortSync]. There
+ * might be many [SendPortSync]s for the same [ReceivePortSync].
+ *
+ * [SendPortSync]s can be transmitted to other isolates.
+ */
abstract class SendPortSync {
-
+ /**
+ * Sends a synchronous message to this send port and returns the result.
+ */
callSync(var message);
+ /**
+ * Tests whether [other] is a [SendPortSync] pointing to the same
+ * [ReceivePortSync] as this one.
+ */
+ bool operator==(var other);
+
+ /**
+ * Returns an immutable hash code for this send port that is
+ * consistent with the == operator.
+ */
+ int get hashCode;
}
// The VM doesn't support accessing external globals in the same library. We
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tests/html/js_interop_2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698