# How to Maximize CPU Utilization - @spawn Assigning to Busy Workers - Use pmap Instead

**URL:** <https://discourse.julialang.org/t/how-to-maximize-cpu-utilization-spawn-assigning-to-busy-workers-use-pmap-instead/53648>\
**Category:** Julia at Scale\
**Tags:** parallel, distributed\
**Created:** [January 20, 2021, 12:52am UTC](https://discourse.julialang.org/t/how-to-maximize-cpu-utilization-spawn-assigning-to-busy-workers-use-pmap-instead/53648 "2021-01-20T00:52:48Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![marius311](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marius311/32/3953_2.png) [@marius311](https://discourse.julialang.org/u/marius311)\
**Post date:** [January 23, 2021, 7:32am UTC](https://discourse.julialang.org/t/how-to-maximize-cpu-utilization-spawn-assigning-to-busy-workers-use-pmap-instead/53648/4 "2021-01-23T07:32:17Z")

</div>

Was just asking about this other day [here](https://discourse.julialang.org/t/dynamically-schedule-work-onto-pmap-worker-pool/53701/6). I think the answer to your question is that instead of `@spawn`, use `remotecall_fetch(default_worker_pool()) do ... end` or even just `pmap` over your `packedChunk`. Both will only use free workers and keep them busy until work is exhausted.

---

_[View the full topic](https://discourse.julialang.org/t/how-to-maximize-cpu-utilization-spawn-assigning-to-busy-workers-use-pmap-instead/53648)._
