# 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:** 3

<div class="post-metadata">

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

</div>

> [@ufechner7](#):
>
> but i am told not to use it.

This was widely advertised already over 2 years ago: [PSA: Thread-local state is no longer recommended; Common misconceptions about threadid() and nthreads()](https://discourse.julialang.org/t/psa-thread-local-state-is-no-longer-recommended-common-misconceptions-about-threadid-and-nthreads/101274)

> [@ufechner7](#):
>
> So how can I use task local storage in a for loop? Or shall I not use for loops any longer?

Consider using OhMyThreads.jl: [Thread-Safe Storage · OhMyThreads.jl](https://juliafolds2.github.io/OhMyThreads.jl/stable/literate/tls/tls/#TSS)

---

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