How should the ExecutorService
paramater of the S3 TransferManager
be used?
#3089
Unanswered
mlichtblau
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am trying to understand how the
ExecutorService
param of theTransferManager
should be used.From the JavaDoc I understand that there is a possibility for a deadlock when the control task cannot submit a subtask because the work queue is full. This can only happen, if 1) the number of threads is bounded and 2) the size of the work queue is bounded, is that correct?
I was wondering if there is the possibility that a control tasks blocks it's current execution thread until a subtask is finished (instead of just submitted). This would mean that having an unbounded queue would not suffice to prevent deadlocks, but we would need an unbounded queue + (potentially) unbounded number of threads so there would always be threads available for executing subtasks in case all threads are occupied with control tasks? This would make it very difficult to provide a meaningful
ExecutorService
implementation that guarantees no deadlock.Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions