# Putting Threads.@threads or any macro in an if statement

**URL:** <https://discourse.julialang.org/t/putting-threads-threads-or-any-macro-in-an-if-statement/41406>\
**Category:** New to Julia\
**Created:** [June 14, 2020, 8:57pm UTC](https://discourse.julialang.org/t/putting-threads-threads-or-any-macro-in-an-if-statement/41406 "2020-06-14T20:57:20Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Michael\_Wang](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/michael_wang/32/8535_2.png) [@Michael\_Wang](https://discourse.julialang.org/u/Michael_Wang)\
**Post date:** [June 15, 2020, 5:33pm UTC](https://discourse.julialang.org/t/putting-threads-threads-or-any-macro-in-an-if-statement/41406/9 "2020-06-15T17:33:45Z")

</div>

I tried it without my macro (the one that specifies a Bool) and only used the first one you wrote. It works, so is there a point for me to include mine then? I guess if I use the first one, I should probably put a check somewhere that returns an error if a Bool isn’t put in. Thanks for the help!

---

_[View the full topic](https://discourse.julialang.org/t/putting-threads-threads-or-any-macro-in-an-if-statement/41406)._
