updateValue

abstract fun updateValue(newValue: T?): AutoCloseable

Changes current value to newValue and returns a cookie which should restore old value on closing