Home | History | Annotate | Download | only in server2

Lines Matching defs:Future

17   '''Creates a Future which returns a list of results from each Future in
20 If any Future raises an error other than those in |except_pass| the returned
21 Future will raise as well.
23 If any Future raises an error in |except_pass| then None will be inserted as
38 return Future(callback=resolve)
42 '''Returns a Future which resolves to the first Future in |futures| that
51 for future in futures:
53 first_future = future
55 return future.Get()
64 return Future(callback=resolve)
67 class Future(object):
80 '''Creates and returns a future that runs |callback| on the value of this
81 future, or runs optional |error_handler| if resolving this future results in
84 If |callback| returns a non-Future value then the returned Future will
87 If |callback| returns a Future then it gets chained to the current Future.
88 This means that the returned Future will resolve to *that* Future's value.
94 return Future(value=42)
100 return Future(value=x + 1)
114 return val.Get() if isinstance(val, Future) else val
115 return Future(callback=then)