VOLLEY日志假想

 final long threadId = Thread.currentThread().getId();
            if (Looper.myLooper() != Looper.getMainLooper()) {
                 // If we finish marking off of the main thread, we need to
                // actually do it on the main thread to ensure correct ordering.

                 //如果我们要完成主线的划线(个人认为是子线路),我们需要在主线中去做
                //以此确保A子线的标记都在一起,依次打出来,然后B标记依次打出来
                //而避免一会打A线标记,一会打B线标记的情况,这样我们需要把实际mark工作交给主线程来完成
                //就是把A划线执行完成后,再去来执行B划线的标记,从而打出
                //主线的A划线和B划线

                Handler mainThread = new Handler(Looper.getMainLooper());
                mainThread.post(new Runnable() {
                    @Override
                    public void run() {
                        mEventLog.add(tag, threadId);
                        mEventLog.finish(this.toString());
                    }
                });
                return;
            }

你可能感兴趣的:(VOLLEY日志假想)