# Changing Threads.nthreads within Atom

**URL:** <https://discourse.julialang.org/t/changing-threads-nthreads-within-atom/25054>\
**Category:** New to Julia\
**Created:** [June 7, 2019, 6:22pm UTC](https://discourse.julialang.org/t/changing-threads-nthreads-within-atom/25054 "2019-06-07T18:22:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pistacliffcho](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pistacliffcho/32/8518_2.png) [@pistacliffcho](https://discourse.julialang.org/u/pistacliffcho)\
**Post date:** [June 7, 2019, 6:22pm UTC](https://discourse.julialang.org/t/changing-threads-nthreads-within-atom/25054/1 "2019-06-07T18:22:22Z")

</div>

I’m trying to change the number of threads allocated to Julia via

```julia
export JULIA_NUM_THREADS=3

```

For some reason, this appears to work when I launch Julia from command line: ![14%20AM](https://global.discourse-cdn.com/julialang/original/3X/2/1/217d6c90bc24bc6e38d424e602cce91797ee6ab8.png)

but does not does not seem to work when I’m using Atom.

 ![21%20AM](https://global.discourse-cdn.com/julialang/original/3X/0/0/0042148431fa79a01f25d4687a2618c4c5607157.png)

I’ve stopped and restarted Julia within Atom, but this does not seem to help.

Note also that by default, Julia launched from command line is v1.1.0, while Atom is using v1.2.0. As far as I can tell, this shouldn’t actually make a difference?

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [June 7, 2019, 6:38pm UTC](https://discourse.julialang.org/t/changing-threads-nthreads-within-atom/25054/2 "2019-06-07T18:38:21Z")

</div>

Juno has its own setting for that (Julia Options \> Number of Threads), which, by default, overrides the global env variable.

---

<div class="post-metadata">

**Author:** ![pistacliffcho](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pistacliffcho/32/8518_2.png) [@pistacliffcho](https://discourse.julialang.org/u/pistacliffcho)\
**Post date:** [June 7, 2019, 8:54pm UTC](https://discourse.julialang.org/t/changing-threads-nthreads-within-atom/25054/3 "2019-06-07T20:54:11Z")

</div>

Thanks!

Oddly, it seems that after you reset the number of threads, you need to stop and start Julia **twice** within Atom to have it register the new thread option.
