[rust-dev] RFC: New Rust channel proposal

Eric Reed ecreed at cs.washington.edu
Tue Jan 14 16:58:39 PST 2014


Good point. Make `Chan` a trait with implementers `UniqueChan` and
`SharedChan`?


On Tue, Jan 14, 2014 at 4:52 PM, Jack Moffitt <jack at metajack.im> wrote:

> > I'm skeptical about combining Chan and SharedChan. Maintaining that
> > distinction is useful for expressing the programmer's intent and would
> > certainly make any analysis that cared to distinguish between single and
> > multiple producers easier to implement (off the top of my head, knowing
> > you're the only one with a Chan means you don't have to deal with
> potential
> > race conditions arising from interleaving of messages from different
> > producers).
>
> I think the core issue about that is that the person who writes the
> type signature of a function doesn't always know the contexts in which
> its used.
>
> jack.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140114/83d18d88/attachment.html>


More information about the Rust-dev mailing list