code: public void shutdown()
      {
          while(true)
          {
              long cur = combinedState.get();
              long newValue = cur | 0x8000000000000000L;
              if (combinedState.compareAndSet(cur, newValue))
              {
                  break;
              }
          }
  
      }
docs: Initiates an orderly shutdown in which previously submitted
  tasks are executed, but no new tasks will be accepted.
  Invocation has no additional effect if already shut down.