The requirement is to get the chat list from the server, and then traverse to get the chat records. I used Observable.from(conversations) and then inserted the conversation into the local database, filtered it to get the required data, and finally updated the view
I saw it One afternoon, there are so many keywords related to
SerializedSubject (I can’t use SerializedSubject.from(conversations), and converting to Observable also reports an error)
trampoline (Put the task in the queue of the current thread, and wait for the current task to be executed. After that, continue to execute the tasks in the queue)
concatEager (What is the difference between this operator and concatMap http://blog.csdn.net/kisty_ya... But there are no examples of use and I don’t understand)
Just now At first, the next step is processed in onNext, and then I use flatMap to process it, but it ends when the launch is completed, without waiting for onNext to finish executing, and I feel that doOnNext and flatMap are the same. I hope you can give me some advice. I feel like a headless fly. Same, can you write down the idea in pseudo code? Thank you
If you want to filter, you should use the Filter operator
Using this operator concatMap can ensure that the order of thread execution will not be disordered!