gianm commented on issue #6212: fix TaskQueue-HRTR deadlock
URL: https://github.com/apache/incubator-druid/pull/6212#issuecomment-415258764
 
 
   @himanshug,
   
   > from the design perspective, to guarantee safety, I think it would 
eventually make more sense to make sure that all kinds of listeners are always 
executed in something other than SameThreadExecutor or that listeners are never 
called with internal locks being held as you don't know what listeners might 
end up doing.
   
   Probably the right thing to do is have the caller that sets a callback also 
pass an ExecutorService to use for that callback. That way the caller has some 
control over what thread pool to use, and the callee doesn't need to have its 
own callbacks thread pool that might never get used.
   
   If it doesn't pass one in, _then_ use a same-thread executor.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to