| Index: mojo/dart/packages/mojo/sdk_ext/src/handle_watcher.dart
|
| diff --git a/mojo/dart/packages/mojo/sdk_ext/src/handle_watcher.dart b/mojo/dart/packages/mojo/sdk_ext/src/handle_watcher.dart
|
| index 3e6201a0f41058318bcb361061f821ab44dfb0e0..2d508f89e707d4b3396ab1c2b5deeb3831e49179 100644
|
| --- a/mojo/dart/packages/mojo/sdk_ext/src/handle_watcher.dart
|
| +++ b/mojo/dart/packages/mojo/sdk_ext/src/handle_watcher.dart
|
| @@ -4,8 +4,6 @@
|
|
|
| part of internal;
|
|
|
| -/// This class contains static methods to send a stream of events to application
|
| -/// isolates that register Mojo handles with it.
|
| class MojoHandleWatcher {
|
| // Control commands.
|
| static const int _ADD = 0;
|
| @@ -32,19 +30,6 @@ class MojoHandleWatcher {
|
| return result;
|
| }
|
|
|
| - /// Stops watching and closes the given [handleToken].
|
| - ///
|
| - /// Returns an integer, encoding the result as specified in the [MojoResult]
|
| - /// class. In particular, a successful operation returns [MojoResult.kOk].
|
| - ///
|
| - /// Notifies the HandleWatcherIsolate that a handle it is
|
| - /// watching should be removed from its set and closed.
|
| - ///
|
| - /// The [handleToken] is a token that identifies the Mojo handle.
|
| - ///
|
| - /// If [wait] is true, returns a future that resolves only after the handle
|
| - // has actually been closed by the handle watcher. Otherwise, returns a
|
| - // future that resolves immediately.
|
| static Future<int> close(int handleToken, {bool wait: false}) {
|
| if (!wait) {
|
| return new Future.value(_sendControlData(_CLOSE, handleToken, null, 0));
|
| @@ -61,55 +46,14 @@ class MojoHandleWatcher {
|
| });
|
| }
|
|
|
| - /// Starts watching for events on the given [handleToken].
|
| - ///
|
| - /// Returns an integer, encoding the result as specified in the [MojoResult]
|
| - /// class. In particular, a successful operation returns [MojoResult.kOk].
|
| - ///
|
| - /// Instructs the MojoHandleWatcher isolate to add [handleToken] to the set of
|
| - /// handles it watches, and to notify the calling isolate only for the events
|
| - /// specified by [signals] using the send port [port].
|
| - // TODO(floitsch): what does "MojoHandleWatcher isolate" mean?
|
| - // TODO(floitsch): what is the calling isolate?
|
| - ///
|
| - /// The [handleToken] is a token that identifies the Mojo handle.
|
| - ///
|
| - /// The filtering [signals] are encoded as specified in the
|
| - /// [MojoHandleSignals] class. For example, setting [signals] to
|
| - /// [MojoHandleSignals.kPeerClosedReadable] instructs the handle watcher to
|
| - /// notify the caller, when the handle becomes readable (that is, has data
|
| - /// available for reading), or when it is closed.
|
| static int add(int handleToken, SendPort port, int signals) {
|
| return _sendControlData(_ADD, handleToken, port, signals);
|
| }
|
|
|
| - /// Stops watching the given [handleToken].
|
| - ///
|
| - /// Returns an integer, encoding the result as specified in the [MojoResult]
|
| - /// class. In particular, a successful operation returns [MojoResult.kOk].
|
| - ///
|
| - /// Instructs the MojoHandleWatcher isolate to remove [handleToken] from the
|
| - /// set of handles it watches. This allows the application isolate
|
| - /// to, for example, pause the stream of events.
|
| - ///
|
| - /// The [handleToken] is a token that identifies the Mojo handle.
|
| static int remove(int handleToken) {
|
| return _sendControlData(_REMOVE, handleToken, null, 0);
|
| }
|
|
|
| - /// Requests a notification on the given [port] at [deadline].
|
| - ///
|
| - /// Returns an integer, encoding the result as specified in the [MojoResult]
|
| - /// class. In particular, a successful operation returns [MojoResult.kOk].
|
| - ///
|
| - /// The [deadline] is in milliseconds, with
|
| - /// [MojoCoreNatives.timerMillisecondClock] as reference.
|
| - ///
|
| - /// If the given [port] was already registered for a timer (in any isolate),
|
| - /// then the old value is discarded.
|
| - ///
|
| - /// A negative [deadline] is used to remove a port. That is, a negative value
|
| - /// is ignored after any existing value for the port has been discarded.
|
| static int timer(Object ignored, SendPort port, int deadline) {
|
| // The deadline will be unwrapped before sending to the handle watcher.
|
| return _sendControlData(_TIMER, deadline, port, 0);
|
|
|