# getThreadLocal<T> static method

LocalThread<T> getThreadLocal<T>(

1. int id

)

Retrieves a LocalThread instance by its unique ID.

This is useful when you need to access a specific LocalThread from a different part of your application, especially across Isolate boundaries where you might only have the ID.

ThreadLocalExample:

    final myLocal = Thread.getThreadLocal<String>(someId);
    final value = myLocal.get();
    if (value != null) {
      print(value);
    }

## Implementation

    static LocalThread<T> getThreadLocal<T>(int id) {
      return LocalThread<T>();
    }