# 1.9-rc1 and threads

**URL:** <https://discourse.julialang.org/t/1-9-rc1-and-threads/96119>\
**Category:** General Usage\
**Created:** [March 15, 2023, 10:41am UTC](https://discourse.julialang.org/t/1-9-rc1-and-threads/96119 "2023-03-15T10:41:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_Soderlind](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paul_soderlind/32/1753_2.png) [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Post date:** [March 15, 2023, 10:41am UTC](https://discourse.julialang.org/t/1-9-rc1-and-threads/96119/1 "2023-03-15T10:41:16Z")

</div>

On Win 64, I have noticed that 1.9-rc1 `Threads.@threads` fails to keep my CPU busy (usage goes down to what you expect from single-threaded mode) in _long_ computations. Clearly different from 1.8.5.

Has anyone else noticed something similar? Any hints?

(Simple/quick examples do not show this, so I would have to think about how to create something that can be replicated.)

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [March 15, 2023, 11:01am UTC](https://discourse.julialang.org/t/1-9-rc1-and-threads/96119/2 "2023-03-15T11:01:58Z")

</div>

What happens if you use `@threads :static for ....` instead of just `@threads for ...`?  
(Background: The default scheduling option for `@threads` has changed from `:static` to `:dynamic`)

---

<div class="post-metadata">

**Author:** ![Paul\_Soderlind](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paul_soderlind/32/1753_2.png) [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Post date:** [March 15, 2023, 12:05pm UTC](https://discourse.julialang.org/t/1-9-rc1-and-threads/96119/3 "2023-03-15T12:05:44Z")

</div>

Thanks, but not much of a difference. So far, the pattern is that the CPU usage increases to 80% or so at the beginning of the threaded calculations and then (in 1.9-rc1) falls back to around 30-40%. In 1.8.5 the usage stays around 80%.

---

<div class="post-metadata">

**Author:** ![Paul\_Soderlind](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paul_soderlind/32/1753_2.png) [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Post date:** [March 17, 2023, 7:57pm UTC](https://discourse.julialang.org/t/1-9-rc1-and-threads/96119/4 "2023-03-17T19:57:59Z")

</div>

I have finally had time to time the code. With 1.9-rc1 it was 88 minutes and with 1.8.5 around 110 minutes. I guess the CPU monitor is somehow fooling me. Sorry for the noise.
