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
{{ message }}
Repository navigation
DefaultFuture#doReceived should call done.signalAll instead of done.signal #3678
in the method of org.apache.dubbo.remoting.exchange.support.DefaultFuture#doReceived, I think we should call done.signalAll() instead of done.signal() ,and it's unnecessary to check done != null because it's always true
changed the title [-]DefaultFuture#doReceived should call done.signalAll instead of done.signalAll[/-][+]DefaultFuture#doReceived should call done.signalAll instead of done.signal[/+]on Mar 16, 2019
Activity
[-]DefaultFuture#doReceived should call done.signalAll instead of done.signalAll[/-][+]DefaultFuture#doReceived should call done.signalAll instead of done.signal[/+]tswstarplanet commentedon Mar 16, 2019
Sounds good! signall can avoid dead lock better
kexianjun commentedon Mar 16, 2019
yes, using signal can cause threads to block until a timeout in some scenarios
xueshanyinyan commentedon Aug 28, 2020
阅读2.6.2版本的源码,觉得这个优化没必要吧,条件变量的等待队列里就一个线程,signal足够了,当然换成signalAll是没啥问题。是实际投入使用中出现了这样的问题吗?是什么样的问题呢?现在的版本已经使用CompletableFuture异步转同步了呢。
LeroyPine commentedon Mar 9, 2021
为什么 signal 或导致线程阻塞呢? DefaultFuture 不是和线程一一对应的。 不存在多线程竞争的关系吧