# Test code with multi-threading

**URL:** <https://discourse.julialang.org/t/test-code-with-multi-threading/41754>\
**Category:** Performance\
**Created:** [June 19, 2020, 10:47pm UTC](https://discourse.julialang.org/t/test-code-with-multi-threading/41754 "2020-06-19T22:47:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [June 19, 2020, 10:52pm UTC](https://discourse.julialang.org/t/test-code-with-multi-threading/41754/2 "2020-06-19T22:52:20Z")

</div>

yes that should work,

also if you’re working with CI:

> [@Julia Multithreading (Threads.@threads) and Travis CI](https://discourse.julialang.org/t/julia-multithreading-threads-threads-and-travis-ci/16468):
>
> Hi all, in a number of packages I started experimenting with code that exploits Julia’s multithreading facilities, i.e. mainly the Threads.@threads macro. I am a bit confused as to how to enable automatic testing of my code using Travis CI, in particular, to enable multithreading on Travis, but also to test both with and without multithreading (i.e. once with Threads.nthreads() == 1 and once with Threads.nthreads()\>1). Is anybody aware of an example travis.yml configuration file that I could lo…

---

_[View the full topic](https://discourse.julialang.org/t/test-code-with-multi-threading/41754)._
