We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I was trying to achieve the following:
from rx import Observable o = Observable.zip(Observable.interval(100), Observable.range(0, 30), lambda x, y: y).publish() o.group_by(lambda x: x//10)\ .flat_map(lambda x: x.timeout(90, other=x.first().map(lambda x: (x, 'first'))))\ .subscribe(lambda x: print(x), lambda x: print('err {}'.format(x)), lambda : print('done')) o.connect() input()
0 (1, 'first') 10 (11, 'first') 20 (21, 'first') done
0 1 2 3 (4, 'first') 10 11 (12, 'first') 20 21 (22, 'first') done
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I was trying to achieve the following:
2.1. apply a timeout
2.2. re-emit the first item if timeout has passed
A minimal example
output
changing the timeout duration to 101 gives the following output:
The text was updated successfully, but these errors were encountered: