152153154155156157158159160161162
PersistentHashSet old, links; try { do { old = linksref.get(); links = (PersistentHashSet) old.cons(h); } while (!linksref.weakCompareAndSet(old, links)); } catch (Exception e) { throw new RuntimeException(e); }