Use ConcurrentLinkedQueue instead of CopyOnWriteArrayList & CopyOnWriteArraySet.
simplify assertion - to prevent iterating collection twice
fixing shutdown time
Cycle detection algorithm micro optimizations.