Package com.trifork.clj_ds

Examples of com.trifork.clj_ds.PersistentHashSet


    unlink_oneway(other);
    other.unlink_oneway(self_handle());
  }
 
  public void unlink_oneway(EHandle handle) {
    PersistentHashSet old, links;
    try {

      do {
        old = linksref.get();
        links = (PersistentHashSet) old.disjoin(handle);
      } while (!linksref.weakCompareAndSet(old, links));

    } catch (Exception e) {
      throw new RuntimeException(e);
    }   
View Full Code Here


  public boolean link_oneway(EHandle h) {
    // TODO: check if h is valid.

    if (h.exists()) {

      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);
      }
View Full Code Here

TOP

Related Classes of com.trifork.clj_ds.PersistentHashSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.