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.
@sjb933 sjb933 closed this Jan 3, 2013
@sjb933
Copy link
Author

sjb933 commented Jan 3, 2013

There's a shortcoming with this implementation. This list should be implemented as a LinkedList working as a Queue. Making the changes.

@sjb933
Copy link
Author

sjb933 commented Jan 4, 2013

This fix is actually good, but I've already resubmitted. I was worried about synchronization, but you had already taken care of that. This should be changed as I've indicated: #194

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