Github user xiaohu-zhang commented on the issue:

    https://github.com/apache/httpcomponents-core/pull/67
  
    1. yes,all the time out task is executed by a separate thread. but I dont 
think IOEventHandler need to synchronization because every channel has 
difference IOEventHandler instance.
    2. suppose there is n channels . every loop interval find time out task, 
original algorithm time complexity is o(n).using time wheel time complexity is 
o(n/k),where k is ticks in PerWheel. original algorithm every interval will 
loop all the task ,the more accurate,the interval need to be reduced.but there 
is contradiction between reduce interval and loop all the task in the 
interval.time wheel every click only need to loop n/k task ,so click time 
interval can be very small ,so trigger the time out task will be more 
accurate.linux ,kafka,quartz and lots of framework using time wheel deal with 
timeout task.


---

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

Reply via email to