# Put!(remotechannel, x) causes no error but an infinite run time

**URL:** https://discourse.julialang.org/t/put-remotechannel-x-causes-no-error-but-an-infinite-run-time/79770
**Category:** General Usage
**Tags:** question, channel
**Created:** [April 21, 2022, 9:49am UTC](https://discourse.julialang.org/t/put-remotechannel-x-causes-no-error-but-an-infinite-run-time/79770 "2022-04-21T09:49:59Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Himbeersternchen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/himbeersternchen/32/19078_2.png) [@Himbeersternchen](https://discourse.julialang.org/u/Himbeersternchen)
#### Post date: [April 21, 2022, 9:49am UTC](https://discourse.julialang.org/t/put-remotechannel-x-causes-no-error-but-an-infinite-run-time/79770/1 "2022-04-21T09:49:59Z")

</div>

Hi Everyone,  
i m trying to use RemoteChannel in Julia:  
julia -p 2  
x = RemoteChannel(()-\>Channel{Array{Float64,2}}(1))  
a = [1 2 3 4; 5 6 7 8]  
put!(x,a) ran perfect. But the maximal length of channel x is 1. So i expect that if i run put!(x,a) again, it would return an error. But it causes only an infinite run time and julia does not respone anymore, until i press the ctl+c to break the process. My Julia version is 1.7.2.  
Best regards

---

<div class="post-metadata">

### Author: ![goerch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goerch/32/29122_2.png) [@goerch](https://discourse.julialang.org/u/goerch)
#### Post date: [April 21, 2022, 9:55am UTC](https://discourse.julialang.org/t/put-remotechannel-x-causes-no-error-but-an-infinite-run-time/79770/2 "2022-04-21T09:55:49Z")

</div>

I would expect `put!` to wait until the other process `get`s some data and there is free space in the channel again.

---

<div class="post-metadata">

### Author: ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)
#### Post date: [April 21, 2022, 10:11am UTC](https://discourse.julialang.org/t/put-remotechannel-x-causes-no-error-but-an-infinite-run-time/79770/3 "2022-04-21T10:11:59Z")

</div>

> [@Himbeersternchen](#):
>
> put!(x,a) ran perfect. But the maximal length of channel x is 1. So i expect that if i run put!(x,a) again, it would return an error.

```julia
help?> put!
search: put! permute! invpermute! pushfirst! permutedims! ispunct

[...]

  put!(rr::RemoteChannel, args...)

  Store a set of values to the RemoteChannel. If the channel is full,
  blocks until space is available. Return the first argument.

```

This is expected behavior - the channel you’ve given the `RemoteChannel` can only hold one item, so it blocks until the channel has space again.

---

<div class="post-metadata">

### Author: ![Himbeersternchen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/himbeersternchen/32/19078_2.png) [@Himbeersternchen](https://discourse.julialang.org/u/Himbeersternchen)
#### Post date: [April 21, 2022, 10:48am UTC](https://discourse.julialang.org/t/put-remotechannel-x-causes-no-error-but-an-infinite-run-time/79770/4 "2022-04-21T10:48:11Z")

</div>

Oh i understand now, Thank you Guys!
