put(Token token) gets called often and I am finding that under load only some of the tasks are executed. Some fail quietly or so it would seem.
I expect my implementation is naive and I need to do some buffering of the tasks, or otherwise handle the tasks differently.
I have two questions specifically:
1) How do I diagnose why only some of my tasks are running? They currently fail quietly.
2) If I find out that the cause is queue saturation, could I create a buffer (perhaps a List of tasks to run) and then wrap that in Runnable to then hand off to the executor? If I did this say every 100ms it would reduce the number of tasks to 10 per second although each tasks would end up having to do a lot more work when executed.