# RemoteChannel for multiple-producer multiple-consumer

**URL:** https://discourse.julialang.org/t/remotechannel-for-multiple-producer-multiple-consumer/41366
**Category:** Performance
**Tags:** question, distributed
**Created:** [June 14, 2020, 11:41am UTC](https://discourse.julialang.org/t/remotechannel-for-multiple-producer-multiple-consumer/41366 "2020-06-14T11:41:14Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![RogerP](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rogerp/32/17496_2.png) [@RogerP](https://discourse.julialang.org/u/RogerP)
#### Post date: [March 13, 2022, 1:08pm UTC](https://discourse.julialang.org/t/remotechannel-for-multiple-producer-multiple-consumer/41366/2 "2022-03-13T13:08:14Z")

</div>

Sorry for the noise, but I have the same use-case as you described but I am still struggling to find a suitable implementation pattern. Did you find a good way to do this? Would you mind sharing it?

Edit: In order to maintain state in a stream of incoming data from a variety of different types of sensor, I resorted to have set of RemoteChannels each one containing a circular buffer of length 2.

Also I want to spin up some remote functions with while loops to ingest data from various ports listening to 0MQ and writing the data to channels for the main thread to deal with. I keep hitting race conditions. And `fetch()` is meaningless as these functions all `return nothing`.

I’ve just posted a complete explanation [here](https://discourse.julialang.org/t/sensor-processing-in-a-robotics-application/77822) if it’s of any interest.

---

_[View the full topic](https://discourse.julialang.org/t/remotechannel-for-multiple-producer-multiple-consumer/41366)._
