nurkiewicz / rxjava-book-examples Goto Github PK
View Code? Open in Web Editor NEWSource code of all examples from Reactive Programming with RxJava book
License: MIT License
Source code of all examples from Reactive Programming with RxJava book
License: MIT License
Is it possible to add the code snippet in this repo for Postgres NOTIFY LISTEN Case study presented in Chapter 5 of the book, where we could reuse the same connection across multiple multiple subscribers who are interested in different channels?
First I thought it the numeric part of the test name was a page number, but that doesn't fit. What's the naming convention applied to the samples? How do I map a sample on a page of the book with the test names in each "chapter" class?
Thanks!
On page 152, following code is implemented for subscribeOn:
log("Starting");
final Observable<String> obs = simple();
log("Created");
obs
.subscribeOn(schedulerA)
.subscribe(
x -> log("Got " + x),
Throwable::printStackTrace,
() -> log("Completed")
);
log("Exiting");
Book output is:
35 | main | Starting
112 | main | Created
123 | main | Exiting
123 | Sched-A-0 | Subscribed
124 | Sched-A-0 | Got A
124 | Sched-A-0 | Got B
124 | Sched-A-0 | Completed
But when I implement same code, I don't get output for scheduler:
0 | main | Starting
81 | main | Created
83 | main | Transformed
94 | main | exiting
Program exits even before scheduler thread starts working. To get output from scheduler thread, I have to make main thread sleep at end.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.