transaction-outbox
transaction-outbox copied to clipboard
ThreadPoolExecutor seems to be single thread by default.
After looking at the code I think you misspelled Math.min instead of Math.max:
/**
* Schedules background worh with a {@link ThreadPoolExecutor}, sized to match {@link
* ForkJoinPool#commonPool()} (or one thread, whichever is the larger), with a maximum queue size
* of 16384 before work is discarded.
*
* @return The submitter.
*/
static Submitter withDefaultExecutor() {
// JDK bug means this warning can't be fixed
//noinspection Convert2Diamond
return withExecutor(
new ThreadPoolExecutor(
1,
Math.min(1, ForkJoinPool.commonPool().getParallelism()),
0L,
TimeUnit.MILLISECONDS,
new ArrayBlockingQueue<Runnable>(16384)));
}
Can you please confirm.
Yup, that's a typo. I don't think many people are actually using that executor.
Will happily take a pull request.
Done. When do you plan to do a release?
Very shortly. A day or two.