code: static void detach() {
          map.get().kill();
          try {
            map.get().join();
          } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
          }
          map.remove();
      }
docs: Detaches the {@link ComThread} for the current thread (peer) by calling {@link #kill()}