code: boolean add(Runnable runnable) {
      int spins = 0;
  
      RunnablePair entries;
  
      while ((entries = callbacks.get()) != END) {
        if (callbacks.compareAndSet(entries, new RunnablePair(runnable, entries))) {
          return true;
        }
  
        if (spins++ > MAX_SPINS) {
          Thread.yield();
          spins = 0;
        }
      }
  
      return false;
    }
docs: Attempt to add an event listener to the list of listeners.
  
  This implementation uses a spin-lock, where the loop copies the entire list of listeners.
  
  @return {@code true} if a task has been queued up, {@code false} otherwise.