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

Issue 1324743003: Add AsyncMemoizer.future. (Closed)

Created:
5 years, 3 months ago by nweiz
Modified:
5 years, 3 months ago
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/async.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Patch Set 1 #

Patch Set 2 : Mark as -dev #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -6 lines) Patch
M CHANGELOG.md View 1 chunk +5 lines, -0 lines 0 comments Download
M lib/src/async_memoizer.dart View 1 chunk +6 lines, -5 lines 2 comments Download
M pubspec.yaml View 1 1 chunk +1 line, -1 line 0 comments Download
M test/async_memoizer_test.dart View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (1 generated)
nweiz
5 years, 3 months ago (2015-09-03 00:30:48 UTC) #1
Lasse Reichstein Nielsen
lgtm
5 years, 3 months ago (2015-09-03 05:03:55 UTC) #2
kevmoo
DBC: lean on reified types a bit to help folks in checked mode? https://codereview.chromium.org/1324743003/diff/20001/lib/src/async_memoizer.dart File ...
5 years, 3 months ago (2015-09-03 11:58:33 UTC) #4
nweiz
On 2015/09/03 11:58:33, kevmoo wrote: > DBC: lean on reified types a bit to help ...
5 years, 3 months ago (2015-09-08 21:07:24 UTC) #5
nweiz
Committed patchset #2 (id:20001) manually as 7b94635668aa790a96695f4260495e33749de2a4 (presubmit successful).
5 years, 3 months ago (2015-09-08 21:08:16 UTC) #6
kevmoo
5 years, 3 months ago (2015-09-08 22:29:18 UTC) #7
Message was sent while issue was closed.
On 2015/09/08 21:07:24, nweiz wrote:
> On 2015/09/03 11:58:33, kevmoo wrote:
> > DBC: lean on reified types a bit to help folks in checked mode?
> > 
> >
>
https://codereview.chromium.org/1324743003/diff/20001/lib/src/async_memoizer....
> > File lib/src/async_memoizer.dart (right):
> > 
> >
>
https://codereview.chromium.org/1324743003/diff/20001/lib/src/async_memoizer....
> > lib/src/async_memoizer.dart:36: final _completer = new Completer();
> > Completer<T>
> > 
> >
>
https://codereview.chromium.org/1324743003/diff/20001/lib/src/async_memoizer....
> > lib/src/async_memoizer.dart:45: if (!hasRun) _completer.complete(new
> > Future.sync(computation));
> > new Future<T> ?
> 
> Reified types for futures in particular vanish almost immediately once anyone
> touches anything, and don't really provide useful checking anyway.

Er, well, if computation returned something incompatible, you get a runtime
exception in checked mode – that's enough to be useful IMHO

Powered by Google App Engine
This is Rietveld 408576698