# Can multiple tasks on different threads write from the same Channel without a lock?

**URL:** <https://discourse.julialang.org/t/can-multiple-tasks-on-different-threads-write-from-the-same-channel-without-a-lock/58661>\
**Category:** General Usage\
**Tags:** question\
**Created:** [April 6, 2021, 3:24am UTC](https://discourse.julialang.org/t/can-multiple-tasks-on-different-threads-write-from-the-same-channel-without-a-lock/58661 "2021-04-06T03:24:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![smabie](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/smabie/32/23673_2.png) [@smabie](https://discourse.julialang.org/u/smabie)\
**Post date:** [April 6, 2021, 3:24am UTC](https://discourse.julialang.org/t/can-multiple-tasks-on-different-threads-write-from-the-same-channel-without-a-lock/58661/1 "2021-04-06T03:24:49Z")

</div>

Pretty much the title says it all: I want to have multiple producers that all write to the same channel. I will then have one consumer that reads the data from this channel. Do the producers need to acquire a lock before calling `put!`?

Thanks!

---

<div class="post-metadata">

**Author:** ![tkf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkf/32/17635_2.png) [@tkf](https://discourse.julialang.org/u/tkf)\
**Post date:** [April 6, 2021, 3:29am UTC](https://discourse.julialang.org/t/can-multiple-tasks-on-different-threads-write-from-the-same-channel-without-a-lock/58661/2 "2021-04-06T03:29:02Z")

</div>

yes (edit: answering to the title)

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [April 6, 2021, 6:33am UTC](https://discourse.julialang.org/t/can-multiple-tasks-on-different-threads-write-from-the-same-channel-without-a-lock/58661/3 "2021-04-06T06:33:08Z")

</div>

no (edit: answering to the text)
