Commit Graph

3 Commits

Author SHA1 Message Date
Avi Kivity
8101c1f2a6 stream/subscription: fix build error in stream::close() 2015-01-07 15:12:23 +02:00
Gleb Natapov
2fb7490bf9 stream: reset subscription's stream pointer in stream's destructor 2014-12-30 15:21:08 +02:00
Avi Kivity
af1c015526 core: add stream/subscription abstraction
The future/promise pair is for single-shot use only, which makes it
less useful for repetitive processing.

Add a stream/subscription abstraction, where a stream can produce data
which is repetitively consumed by the subscription.  End-or-stream (or
error condition) is provided by a future.

Inspired by Dart's Stream class.
2014-09-22 11:25:54 +03:00