I’m interested in leveraging Julia’s built-in RemoteChannels to replicate some of the functionality that ROS (http://www.ros.org/) provides. Unfortunately I’m running into some issues with calling put! on a RemoteChannel. Calling put! on a channel will block if the Channel is full, but what I would like is for put! to replace the oldest item in the Channel’s buffer. In this way, put! will never block the publisher, and the subscriber will always have access to the latest data.
Anyone have suggestions on an elegant way to make this happen? Looking at the source code it looks like one ugly but fairly easy way to make this happen is first check if the Channel is full before calling put!, and if so manually remove the oldest item in the Channel’s buffer.