Github user HeartSaVioR commented on the pull request: https://github.com/apache/storm/pull/532#issuecomment-158759020 @revans2 I thought about deadlock again, and I couldn't see deadlock you stated. Let's think about these scenario, subprocess emits tuple and waits for taskids while _pendingWrites is full. - ExecutorThread will be blocked waiting for writing BoltMsg to _pendingWrites (since it's fix size queue). - ReaderThread will be blocked waiting for writing taskids - which subprocess is waiting for - to _pendingWrites (again, since it's fix size queue). - WriterThread will pull message from _pendingWrites and send to subprocess. - Though message is BoltMsg, not taskids, subprocess can add BoltMsg (tuple) to its pending queue (unbounded) when waiting for taskids. - _pendingWrites adds message in order, so eventually taskids is written to _pendingWrites and ReaderThread will be unblocked. (Sure, eventually ExecutorThread will be unblocked, too) - Subprocess can finish emitting tuple, and continue processing. It seems to be safe because of unbounded queues in subprocess. Please let me know if I missed something.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---