# No more threadid indexing? \[thread-local storage\]

**URL:** <https://discourse.julialang.org/t/no-more-threadid-indexing-thread-local-storage/131535>\
**Category:** Performance\
**Tags:** multithreading, threads\
**Created:** [August 11, 2025, 7:08pm UTC](https://discourse.julialang.org/t/no-more-threadid-indexing-thread-local-storage/131535 "2025-08-11T19:08:58Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [August 11, 2025, 7:37pm UTC](https://discourse.julialang.org/t/no-more-threadid-indexing-thread-local-storage/131535/5 "2025-08-11T19:37:31Z")

</div>

> [@ufechner7](#):
>
> But now I am told that thread-local storage is no longer supported by Julia. […] So how can I use task local storage in a for loop?

You can’t use an array indexed by `threadid()`, but there are other mechanisms for task-local storage.

For example, the `Base` function `task_local_storage()` gives you a task-local `IdDict`. You can also use other patterns, e.g. a `Channel` as described in [Pattern for managing thread local storage? - #2 by tkf](https://discourse.julialang.org/t/pattern-for-managing-thread-local-storage/54023/2).

---

_[View the full topic](https://discourse.julialang.org/t/no-more-threadid-indexing-thread-local-storage/131535)._
