hi,comming again
LastYear I already writon those topic ,today I’m going talk it again and focus on async.
first of all ,you should understand the structure of Completable that I talked before ,then you should know how to iterate the structure on a thread.
then we’ll going to talk about how to iterate the structure on different thread.
here is the answear ,use pre-order to iterate Completable , if you want to use different thread ,once you iterate a node ,just let it run another thread ,then go back to it’s parent. that’s all.
if you want to know the details in code , just keep watching.
first , just let all node in a thread , if you want a node run in other thread ,when iterate that node , just check if the node have Execute, if had then ,let Execute to run it . then goback to the node’s parent ,and keeping research.
Second ,Execute will run the onde as async, so don’t need check if it in Async ,because it already Async.
Third, the onde run in other thread , just repeat first step,
Here is small little details should be added.
if one child node run in other thread , before it repeat step first ,will try to help run it’s parent node .
if you can understand all of them ,you will use function Async as many as possible ,and just make your ForkJoinPool work well.
that’all .thanks for reading.