Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
snippet hack to make share operator hot
storeObservable =
Observable.interval(1, TimeUnit.SECONDS)
.map(new Func1<Long, Integer>() {
public Integer call(Long aLong) {
return aLong.intValue();
// Do not do this in production!
// this is a hack!
storeObservable = storeObservable.subscribe();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment