The Javadoc says that the tasks will be executed sequentially. But does sequentially here mean that the sequence will be the order that the tasks are submitted? Or does it mean that only one task will be done at a time, but may not do them in the order they were submitted?
The javadoc says:
Creates an Executor that uses a single worker thread operating off an unbounded queue
A queue respects the insertion order. So yes, tasks will be executed in the order they were submitted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With