-
-
Save KowalczykBartek/dd7b0ad6055422f42ac57969a6bd6d07 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Observable.just(1, 2, 3, 4, 5)// | |
.map(c -> { | |
System.out.println("1 " + Thread.currentThread().getName()); | |
return c; | |
})// | |
.flatMap(a -> { | |
return Observable.just(1) // | |
.observeOn(Schedulers.io())// | |
.map(b -> b)// | |
.map(c -> { | |
try | |
{ | |
Thread.sleep(10000); | |
} | |
catch (InterruptedException e) | |
{ | |
e.printStackTrace(); | |
} | |
System.out.println("2 " + Thread.currentThread().getName()); | |
return c; | |
}); | |
},1)// | |
.map(c -> { | |
System.out.println("3 " + Thread.currentThread().getName()); | |
return c; | |
}) // | |
.subscribe(); | |
while (true) | |
{ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment