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

Unified Diff: mojo/dart/packages/mojo/sdk_ext/src/natives.dart

Issue 1695103002: Fix documentation for waitMany. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: More cleanups. Created 4 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/dart/packages/mojo/sdk_ext/src/natives.dart
diff --git a/mojo/dart/packages/mojo/sdk_ext/src/natives.dart b/mojo/dart/packages/mojo/sdk_ext/src/natives.dart
index dd91139ff83b6026ebf653a7193298b5e9b48735..e4f8fbbb3de2780b9d00e5c0b6cac0610108a837 100644
--- a/mojo/dart/packages/mojo/sdk_ext/src/natives.dart
+++ b/mojo/dart/packages/mojo/sdk_ext/src/natives.dart
@@ -132,10 +132,12 @@ class MojoHandleNatives {
/// Returns a list of two elements. The first entry is an integer, encoding
/// if the operation was a success or not, as specified in the [MojoResult]
/// class. In particular, a successful operation is signaled by
- /// [MojoResult.kOk]. The second entry is itself a List of 2 elements:
+ /// [MojoResult.kOk]. The second entry is itself a list of 2 elements:
/// an integer of satisfied signals, and an integer of satisfiable signals.
/// Both entries are encoded as specified in [MojoHandleSignals].
///
+ /// A signal is satisfiable, if the signal may become true in the future.
+ ///
/// The [deadline] specifies how long the call should wait (if no signal is
/// triggered). If the deadline passes, the returned result-integer is
/// [MojoResult.kDeadlineExceeded]. If the deadline is 0, then the result
@@ -155,7 +157,14 @@ class MojoHandleNatives {
/// Waits on many handles at the same time.
///
- /// The returned value is similar to the result of [wait].
+ /// Returns a list with exactly 3 elements:
+ /// - the result integer, encoded as specified in [MojoResult]. In particular,
+ /// [MojoResult.kOk] signals success.
+ /// - the index of the handle that caused the return. May be `null` if the
+ /// operation didn't succeed.
+ /// - a list of signal states. May be `null` if the operation didn't succeed.
+ /// Each signal state is represented by a list of 2 elements: an integer of
+ /// satisfied signals, and an integer of satisfiable signals (see [wait]).
///
/// Behaves as if [wait] was called on each of the [handleTokens] separately,
/// completing when the first would complete.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698