开发者

Android Handler Message Queue

开发者 https://www.devze.com 2023-03-02 04:18 出处:网络
I am ca开发者_C百科lling handler.postDelayed(runnable, time); handler.post(runnable2); Will the second runnable not get handled until the first message in the queue does, after \"time\" has passed?N

I am ca开发者_C百科lling

handler.postDelayed(runnable, time); handler.post(runnable2);

Will the second runnable not get handled until the first message in the queue does, after "time" has passed?


No. The second runnable will be posted immediately and would execute before the first -- depending on the time parameter in the first, anyway. If you post the first with a negligible delay for time it's possible it could execute first. I don't believe there's any guarantee in place that it wouldn't.

0

精彩评论

暂无评论...
验证码 换一张
取 消