Open kahzix opened 3 years ago
private void enqueueAction(Action action) { mQueue.add(action); if (mQueue.size() == 1) { handleAction(); }else{ Log.i(TAG,"mQueue.size != 1 : "+mQueue.size()); } }
In addition, we do not accept issues unrelated to Fragmentation.
在多线程的情况下,可能会出现,单线程不会
因为一旦进入handleAction 就会一直从队列获取数据,直到为空, 不会出现多线程的问题,因为所有Action 都是发送到主线程中,进行入队的。 可参考我维护的版本 #1237 ,解决了一些问题,对难理解的地方进行了注释
private void enqueueAction(Action action) { mQueue.add(action); if (mQueue.size() == 1) { handleAction(); }else{ Log.i(TAG,"mQueue.size != 1 : "+mQueue.size()); } }
In addition, we do not accept issues unrelated to Fragmentation.