我参与设计的一个android多线程框架,用于SAP customer briefing
for simplify reason I only list three carousel item ( News, Opportunity and Business History ).
UI thead will start thread1, 2 and 3 simultaneously
For thread 1, 2 and 3: once they finish, they will trigger corresponding call back listener implemented in UI thread;
for listener designed for thread1, it will start three new thread simultaneously: thread 4 , 5 and 6.
Let’s define “a > b“ means a happens earlier than b:
Regarding sequence, we can only ensure that a > b, b > c, b > d, b > e,
we can NOT ensure the sequence among c, d, e, f, g
So if we use standard Android performance library, you will find that start and stop performance interaction step are not sequentially matched as “Start1, end1, start2, end2, start3, end3…“.
As confirmed by Stephan, our case is not supported by library. So we have implemented our own logic to record performance.
要获取更多Jerry的原创文章,请关注公众号"汪子熙":