Support a simple QueuedExecutor
that can be drained (in the calling thread or a separate executor)
#3986
Labels
QueuedExecutor
that can be drained (in the calling thread or a separate executor)
#3986
While creating tests I thought it would be nice to have what I call a
QueuedExecutor
that can be supplied to code-under-test and then I can verify the tasks that are queued and optionally execute them in my thread or a separate executor. This would look something like:And
MoreExecutors
can have a method to return one e.g.newQueuedExecutor
Note that this is different from the behavior ofMoreExecutors.newSequentialExecutor
. I can create a PR to add this depending on feedback.The text was updated successfully, but these errors were encountered: