Skip to content

Any way to make the rx side of the channel easily .clone() able? #6

@brandonros

Description

@brandonros
lazy_static! {
  static ref runtime: Runtime = Builder::new_multi_thread()
    .enable_all()
    .build()
    .unwrap();
  static ref channel: (UnboundedRequestSender<i32, i32>, UnboundedRequestReceiver<i32, i32>) = bmrng::unbounded_channel::<i32, i32>();
  static ref channel_tx: UnboundedRequestSender<i32, i32> = channel.0.clone();
  static ref channel_rx: UnboundedRequestReceiver<i32, i32> = channel.1.clone();
}

Trying to be able to do something like this I guess

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions