Currently, there is a logical function to parse Excel. Considering the large amount of data, we plan to divide the data into several parts, process the data in multiple threads, and use countDownLatch to wait for the completion of all threads to continue the subsequent operations.

However, it wasn’t always smooth sailing, and I stumbled, which is a silly thing to say.

The main thread handled by Excel uses @async to share a thread pool with a coreSize of 2

The data processing part of the thread pool started using the same thread pool, hehe hehe

When two requests come in at the same time, countDownLatch is thrown into the thread pool for multi-thread processing. But, coreSize = 2, so, it is queued to wait. The main thread is await, and there are no free threads available in the thread pool

The solution is to plug a new thread pool into the logical processing section, bingo.