crosstalk
A lightweight wrapper of tokio's bounded broadcasting channels to enable topic-based (publisher/subscriber) paradigm of mpmc communication.
use thread;
use HashMap;
use AsTopic;
// required for crosstalk topic
// required for crosstalk data
// required for crosstalk data
init! ;
// TopicZoo::Topic6 not included: defaults to String
Why crosstalk?
Most mpmc libraries focuses on a single FIFO channel, rather than broadcasting. Tokio is one of the only established mpmc / async libraries that supports broadcasting, so the motivation was to wrap tokio
's channels with a topic-based paradigm, similar to ROS, for ease of use. Crosstalk acts as a lightweight wrapper of tokio::sync::broadcast
, correlating topic enums with datatypes and senders/receivers. Crosstalk can be used to dynamically create and destroy publishers and subscribers at runtime, across multiple threads.
License
Crosstalk is released under the MIT license http://opensource.org/licenses/MIT