code: void releaseSharedSlot(SharedSlot sharedSlot) {
  		synchronized (lock) {
  			if (sharedSlot.markCancelled()) {
  				// we are releasing this slot
  				
  				if (sharedSlot.hasChildren()) {
  					final FlinkException cause = new FlinkException("Releasing shared slot parent.");
  					// by simply releasing all children, we should eventually release this slot.
  					Set<Slot> children = sharedSlot.getSubSlots();
  					while (children.size() > 0) {
  						children.iterator().next().releaseSlot(cause);
  					}
  				}
  				else {
  					// if there are no children that trigger the release, we trigger it directly
  					internalDisposeEmptySharedSlot(sharedSlot);
  				}
  			}
  		}
  	}
docs: Called from {@link org.apache.flink.runtime.instance.SharedSlot#releaseSlot(Throwable)}.
  
  @param sharedSlot The slot to be released.