Skip to content

static mpsc should be able to hand out senders after splitting #69

Description

@hawkw

it would be nice to have a

pub fn sender(&'static self) -> Option<StaticSender<T, R>>

on the StaticChannel types. The split method can only be called once because it creates the receiver, and this is a single-receiver channel, but the channel type should be able to create multiple senders, rather than just returning a StaticSender that can be Cloned.

the method would need to return an Option (or Result?) though, because it shouldn't be able to make a new sender once the channel has closed (if either the rx was dropped or all the txs have been dropped).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions