- Add chain() which can be used as a low-overhead way to build more efficient sequences without spawning a greenlet.
- Small performances optimizations for redis (slots)
- Upgrade to gevent 1.1+, while keeping the gbatchy exc_info behavior (you get the whole traceback once).
- Small performance optimization for redis.
- Small performance optimization for transform() (& by proxy @batched functions)
- Fix a context propagation via add_auto_wrapper when using batch functions. Also makes batch functions slightly more efficient.
- Added a may_block context manager to be able to use gevent primitives between batch greenlets. For an example, see the iwait & wait implementations.
- Add a version of iwait & wait that work in a batch context.
- Fix *_unordered - this was previously using gevent.iwait.
- Add a Pool implementation that mirrors gevent.pool.Pool, but works with batch greenlets. Unfortunately it was not as simple as greenlet_class=BatchGreenlet.
- Fix redis *scan functions.
Features:
- A couple of useful utils:
immediate,immediate_exception, andtransform. pmap/pfilterfunctions now take**kwargsthat get passed through.- New function
spawn_proxy: same asspawn, but returns a proxy-type that evaluates to spawn().get() - Add
as_future=Trueto @batched/@class_batched functions. Since the @batched system uses AsyncResult-like objects under the hood anyway, this lets you take advantage of that. You can save a bit of spawn() calls. - Add max_size to specify the maximum number of calls to coalesce. TODO: Add a way to specify this as e.g. sum(map(len, args_list))
Bugfixes:
- BatchAsyncResult.wait was broken if the value was not available at the time of the call.
- BatchAsyncResult.get has support for the timeout arg.
- BatchAsyncResult.get_nowait exists (alias for .get(block=False))
- BatchAsyncResult.set_exc_info now properly sets .exception (in case .get() is called multiple times).
- BatchAsyncResult.successful no longer raises.
- Circular dependency between context & scheduler is now gone.
A lot of refactoring to performance critical code.
Initial release