@@ -0,0 +1,1103 @@
+#!/usr/bin/env python3%0A%0A'''%0A    Process two different streams in parallel,%0A    retrieving them from the module's scope%0A'''%0A%0Aimport rx%0Aimport asyncio%0Afrom concurrent.futures import ThreadPoolExecutor%0Afrom functools import partial%0A%0Aimport APIReaderTwitter as Twitter%0A%0Atry:%0A    import json%0Aexcept ImportError:%0A    import simplejson as json%0A%0Adef is_not_delete(element):%0A    return not %22delete%22 in element%0A%0Adef is_delete(element):%0A    return %22delete%22 in element%0A%0Adef pretty_print(element):%0A    print(json.dumps(element, indent=4))%0A%0A%0Atwitter_stream = rx.Observable.from_(Twitter.get_iterable())%0A%0Adeleted_stream = twitter_stream.filter(is_not_delete)%0Atweet_stream = twitter_stream.filter(is_delete)%0A%0A%0Adef process_deleted():%0A    deleted_stream.subscribe(pretty_print)%0A%0Adef process_tweets():%0A    tweet_stream.subscribe(pretty_print)%0A%0Aif __name__ == %22__main__%22:%0A    executor = ThreadPoolExecutor(2)%0A    loop = asyncio.get_event_loop()%0A%0A    deleted = asyncio.async(loop.run_in_executor(executor, process_deleted))%0A    tweets  = asyncio.async(loop.run_in_executor(executor, process_tweets))%0A%0A    loop.run_forever()%0A

Add example of processing two different streams in separate threads retrieving the streams from the module's global scope.