Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

Commit

Permalink
spelling fixes
Browse files Browse the repository at this point in the history
R=lrn@google.com

Review URL: https://codereview.chromium.org//1036513002
  • Loading branch information
kevmoo committed Mar 24, 2015
1 parent 65dc0c6 commit 4b177a9
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 17 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
###0.2.1

* Fixed spelling in a number of doc comments and the README.

###0.2.0

* Renamed library `isolaterunner.dart` to `isolate_runner.dart`.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ that gives easy access to the `Isolate` functionality, and also
gives a way to run new functions in the isolate repeatedly, instead of
just on the initial `spawn` call.

### A central registry for values that can be used accross isolates.
### A central registry for values that can be used across isolates.

The "registry.dart" sub-library provides a way to create an
object registry, and give access to it accross different isolates.
object registry, and give access to it across different isolates.

### Balancing load accross several isolates.
### Balancing load across several isolates.

The "load_balancer.dart" sub-library can manage multiple `Runner` objects,
including `IsolateRunner`, and run functions on the currently least loaded
Expand Down
2 changes: 1 addition & 1 deletion example/runner_pool.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void main() {
});
}

// Compute fibonnacci 1..limit
// Compute fibonacci 1..limit
Future<List<int>> parfib(int limit, int parallelity) {
return LoadBalancer.create(parallelity, IsolateRunner.spawn).then(
(LoadBalancer pool) {
Expand Down
2 changes: 1 addition & 1 deletion lib/load_balancer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class _LoadBalancerEntry implements Comparable<_LoadBalancerEntry> {
/// Whether the entry is still in the queue.
bool get inQueue => queueIndex >= 0;

Future run(LoadBalancer balancer, int load, function(argumen), argument,
Future run(LoadBalancer balancer, int load, function(argument), argument,
Duration timeout, onTimeout()) {
return runner.run(function, argument,
timeout: timeout, onTimeout: onTimeout).whenComplete(() {
Expand Down
4 changes: 2 additions & 2 deletions lib/ports.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import "src/lists.dart";
///
/// The [callback] function is called once, with the first message
/// received by the receive port.
/// All futher messages are ignored.
/// All further messages are ignored.
///
/// If [timeout] is supplied, it is used as a limit on how
/// long it can take before the message is received. If a
Expand Down Expand Up @@ -245,7 +245,7 @@ void completeFutureResult(var response, Completer completer) {
}


/// Convertes a received message created by [sendFutureResult] to a future
/// Converts a received message created by [sendFutureResult] to a future
/// result.
///
/// The [response] must be a message on the format sent by [sendFutureResult].
Expand Down
6 changes: 3 additions & 3 deletions lib/registry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ const int _FIND = 5;
/// It is recommended to only have one `Registry` object working on the
/// same registry in each isolate.
///
/// When the registry is shared accross isolates, both elements and tags must
/// When the registry is shared across isolates, both elements and tags must
/// be sendable between the isolates.
/// Between isolates spawned using [Isolate.spawn] from the same initial
/// isolate, most objectes can be sent.
/// isolate, most objects can be sent.
/// Only simple objects can be sent between isolates originating from different
/// [Isolate.spawnUri] calls.
class Registry<T> {
Expand All @@ -50,7 +50,7 @@ class Registry<T> {
// also copying the cache.
static Expando _caches = new Expando();

/// Port for sending command to the central registry mananger.
/// Port for sending command to the central registry manager.
SendPort _commandPort;

/// Create a registry linked to a [RegistryManager] through [commandPort].
Expand Down
4 changes: 2 additions & 2 deletions lib/runner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ class Runner {
/// Request that [function] be called with the provided arguments.
///
/// The arguments will be applied to the function in the same way as by
/// [Function.apply], but it may happen in a diffent isolate or setting.
/// [Function.apply], but it may happen in a different isolate or setting.
///
/// It's necessary that the function can be sent through a [SendPort]
/// if the call is performed in another isolate.
/// That means the other isolate should be created using [Isolate.spawn]
/// so that it is running the same code as the sending isoalte,
/// so that it is running the same code as the sending isolate,
/// and the function must be a static or top-level function.
///
/// Waits for the result of the call, and completes the returned future
Expand Down
4 changes: 2 additions & 2 deletions lib/src/errors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class MultiError extends Error {
int count = 0;
int errors = 0;
int values = 0;
// Initilized to `new List(count)` when count is known.
// Initialized to `new List(count)` when count is known.
// Filled up with values on the left, errors on the right.
// Order is not preserved.
List results;
Expand Down Expand Up @@ -103,7 +103,7 @@ class MultiError extends Error {
int count = 0;
bool hasError = false;
int completed = 0;
// Initalized to `new List(count)` when count is known.
// Initialized to `new List(count)` when count is known.
// Filled with values until the first error, then cleared
// and filled with errors.
List results;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: isolate
version: 0.2.0
version: 0.2.1-dev
author: Dart Team <misc@dartlang.org>
description: Utility functions and classes related to the 'dart:isolate' library.
homepage: https://github.com/dart-lang/isolate
Expand Down
4 changes: 2 additions & 2 deletions test/registry_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -467,9 +467,9 @@ void testMultiRegistry() {
expect(entries, hasLength(1));
l2 = entries.first;
expect(l2, equals(l1));
// The object for registry2 is not idential the one for registry1.
// The object for registry2 is not identical the one for registry1.
expect(!identical(l1, l2), isTrue);
// Removeing the registry1 object through registry2 doesn't work.
// Removing the registry1 object through registry2 doesn't work.
return registry2.remove(l1, removeCapability);
}).then((removeSuccess) {
expect(removeSuccess, isFalse);
Expand Down

0 comments on commit 4b177a9

Please sign in to comment.