# Threads/Parallel

**URL:** https://discourse.julialang.org/t/threads-parallel/1101
**Category:** New to Julia
**Created:** [December 22, 2016, 9:08am UTC](https://discourse.julialang.org/t/threads-parallel/1101 "2016-12-22T09:08:21Z")
**Posts on this page:** 3
**Page:** 2

<div class="post-metadata">

### Author: ![Steven\_Sagaert](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/steven_sagaert/32/29578_2.png) [@Steven\_Sagaert](https://discourse.julialang.org/u/Steven_Sagaert)
#### Post date: [January 18, 2017, 3:02pm UTC](https://discourse.julialang.org/t/threads-parallel/1101/21 "2017-01-18T15:02:39Z")

</div>

Just to be fair to Java: that 's only true if you do thread programming at the lowest level directly using the Thread API. Unless you write your own threadpool or something similar, almost no Java programmer would write multithreaded/paralllel code like that anymore. It’s been possible since many years to use threadpools (see java.util.concurrent.Executor & subinterfaces/classes) and now in Java 8 you can use the declarative high level API of parallel streams.

---

<div class="post-metadata">

### Author: ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)
#### Post date: [October 24, 2017, 4:27am UTC](https://discourse.julialang.org/t/threads-parallel/1101/22 "2017-10-24T04:27:16Z")

</div>

> [@yuyichao](#):
>
> For a fixed size threaded loops, the simplest and reasonably efficient thing to do is to divide the loop range into multiple sub ranges and let each threads handle one of the sub ranges.This way, you can also take advantage of the single thread loop optimizations.

Is there an example of how to do this? The example on Julia parallel computing is just a straight for-loop

---

<div class="post-metadata">

### Author: ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)
#### Post date: [October 24, 2017, 12:34pm UTC](https://discourse.julialang.org/t/threads-parallel/1101/23 "2017-10-24T12:34:40Z")

</div>

That’s already how it’s implemented.

[Previous page](https://discourse.julialang.org/t/threads-parallel/1101.md?page=1)
