-
New Feature
-
Resolution: Done
-
Normal
-
8.6.0.1
-
Security Level: Jimmy
-
ZK 8.6.3 S1
-
None
currently _schedInfos in DesktopImpl is manually synchronized
https://github.com/zkoss/zk/blob/v8.6.0.1/zk/src/org/zkoss/zk/ui/impl/DesktopImpl.java#L163-L164
Using a ConcurrentLinkedQueue (since java 1.5) can avoid synchronized blocks when adding ScheduleListeners to the end (.offer()) ...
https://github.com/zkoss/zk/blob/v8.6.0.1/zk/src/org/zkoss/zk/ui/impl/DesktopImpl.java#L1597-L1603
and removing them from the start of the queue (.poll()).
https://github.com/zkoss/zk/blob/v8.6.0.1/zk/src/org/zkoss/zk/ui/impl/DesktopImpl.java#L1802-L1825
At the same time the loop code can be simplified (no need to copy the contents, or re-add intermediately added items)
- relates to
-
ZK-4194 ZK cannot clear disconnected desktops reliably by remove-desktop requests
- Closed