NCTP Writer: Do not run dry
Opened 20 months ago
Last modified 19 months ago
#2619newdefect
NCTP Writer: Do not run dry
Reported by:joggerOwned by:zzz Priority: minor Milestone: undecided Component: router/transport Version: 0.9.42 Keywords:
Cc:
Parent Tickets:
Sensitive: no
Description
Writer.java has a comment in wantsWrite() that highlights the bug. If a con is already transmitting the next write to the same con wakes up another instance falling into wait() immediately again.
Putting the notify() there where the comment is, solves the issue. NTCP Writer then runs less frequently, with a longer average time slice. CPU usage clearly down. A bit hard to read, using only two sets would make the code much more readable.