You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had searched in the issues and found no similar issues.
Enhancement Request
SyncPutQueuePolicy was proposed in #54. When this policy is used and the thread pool blocking queue is full, the main thread will put the rejected task to the queue in a blocking manner.
However, if the system fails to complete the task in the thread pool in time, the put method will be blocked, which will cause the thread to continue to block and the user request to time out.
Describe the solution you'd like
I think it is better to use the offer method of the blocking queue instead of the put method. In this way, we can prevent infinite blocking by setting a timeout
Search before asking
Enhancement Request
SyncPutQueuePolicy was proposed in #54. When this policy is used and the thread pool blocking queue is full, the main thread will put the rejected task to the queue in a blocking manner.
However, if the system fails to complete the task in the thread pool in time, the put method will be blocked, which will cause the thread to continue to block and the user request to time out.
Describe the solution you'd like
I think it is better to use the offer method of the blocking queue instead of the put method. In this way, we can prevent infinite blocking by setting a timeout
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: