Skip to content

Conversation

@sjb933
Copy link

@sjb933 sjb933 commented Jan 3, 2013

Contrary to the expectations of every Handler, I found that the RunnableHandler processes runnables in a LIFO (stack-like fashion).  

The correct approach is to process them in order and then clear the list, as I've done here.  This not only processes the items in FIFO order as expected, it also avoids any overhead of trying to remove the first element of the ArrayList.

Contrary to the expectations of every Handler, I found that the RunnableHandler processes runnables in a LIFO (stack-like fashion).  

The correct approach is to process them in order and then clear the list, as I've done here.  This not only processes the items in FIFO order as expected, it also avoids any overhead of trying to remove the first element of the ArrayList.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant