initialValue method

  1. @protected
T? initialValue()

Returns the initial value for this LocalThread.

This method is called when a new LocalThread is created and no value has been set yet. The default implementation returns null, but you can override it to provide a custom initial value.

Implementation

@protected
T? initialValue() {
  return null;
}