michaelwiles / google-gin

Automatically exported from code.google.com/p/google-gin
Apache License 2.0
0 stars 0 forks source link

Add an API for invoking code before and after an AsyncProvider runs #124

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In some situations, it's useful to be able to run code on the other side of the 
GWT.runAsync boundary, both before and after the call to the provider's .get(). 
 It's also useful to be able to cancel the .get().  It would be especially nice 
if I could do all this without reimplementing AsyncProvider in my own code.

I have a patch at http://codereview.appspot.com/2822042 that extends 
AsyncProvider with support for a new callback type (the extension is backwards 
compatible).

Original issue reported on code.google.com by dburr...@google.com on 2 Nov 2010 at 7:05

GoogleCodeExporter commented 9 years ago
This sounds a lot like AOP. How important is this (and the many other 
AsyncProvider feature requests)? I'm happy to add more stuff to Gin but I'd 
like to make sure that we only add things that are actually useful to many 
people.

Original comment by aragos on 3 Nov 2010 at 5:08

GoogleCodeExporter commented 9 years ago
TBH, I think it might not be worth the extra complexity.  It's already possible 
to run extra code by either just implementing your own AsyncProvider, or using 
AsyncProvider<Provider<T>>.

Original comment by dburr...@google.com on 4 Nov 2010 at 6:51

GoogleCodeExporter commented 9 years ago
Marking as "Won't fix" for now since there's an easy workaround and not too 
much interest for something complex.

Original comment by aragos on 21 Jan 2011 at 9:23