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

Unified Diff: lib/src/async_memoizer.dart

Issue 1777453002: Modernize the package's style. (Closed) Base URL: git@github.com:dart-lang/async.git@master
Patch Set: Code review changes Created 4 years, 9 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 | « lib/result.dart ('k') | lib/src/cancelable_operation.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/async_memoizer.dart
diff --git a/lib/src/async_memoizer.dart b/lib/src/async_memoizer.dart
index 41c3dae87a46054708456ced01a04d582891cb07..3612a7d02d7a128447ca18fffcb3fc05d1058f0f 100644
--- a/lib/src/async_memoizer.dart
+++ b/lib/src/async_memoizer.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library async.async_memoizer;
-
import 'dart:async';
/// A class for running an asynchronous function exactly once and caching its
@@ -35,12 +33,12 @@ class AsyncMemoizer<T> {
Future<T> get future => _completer.future;
final _completer = new Completer();
- /// Whether [run] has been called yet.
+ /// Whether [runOnce] has been called yet.
bool get hasRun => _completer.isCompleted;
/// Runs the function, [computation], if it hasn't been run before.
///
- /// If [run] has already been called, this returns the original result.
+ /// If [runOnce] has already been called, this returns the original result.
Future<T> runOnce(computation()) {
if (!hasRun) _completer.complete(new Future.sync(computation));
return future;
« no previous file with comments | « lib/result.dart ('k') | lib/src/cancelable_operation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698