neuroglancer.trackable_state.TrackableState[State].set_state(
    
new_state: Any | State,
    
generation: str | None = None,
    
existing_generation: str | None = None,-> str

Sets a new value.

Parameters:
new_state: Any | State

New state value to assign.

generation: str | None = None

Generation associated with new_state. If not specified, a new unique generation is generated.

existing_generation: str | None = None

Atomically assign the new state only if the existing state has the specified generation.

Returns:

Generation associated with the new state.

Raises:

ConcurrentModificationError – If existing_generation is specified and does not match.