Proposal: Thread-sealed containers

2011-03-26 Thread dsimcha
I'm thinking about ways to make std.concurrency's model more flexible without compromising safety. It's sometimes useful to cheaply _move_ (as opposed to share or copy) data between threads. I wonder if we could co-opt sealed containers here: 1. Define basic data structures like arrays, has

Re: Proposal: Thread-sealed containers

2011-03-26 Thread Jason House
dsimcha Wrote: > I'm thinking about ways to make std.concurrency's model more flexible > without compromising safety. It's sometimes useful to cheaply _move_ > (as opposed to share or copy) data between threads. I wonder if we > could co-opt sealed containers here: What definition of sealed

Re: Proposal: Thread-sealed containers

2011-03-27 Thread dsimcha
On 3/27/2011 2:47 AM, Jason House wrote: dsimcha Wrote: I'm thinking about ways to make std.concurrency's model more flexible without compromising safety. It's sometimes useful to cheaply _move_ (as opposed to share or copy) data between threads. I wonder if we could co-opt sealed containers

Re: Proposal: Thread-sealed containers

2011-03-27 Thread Andrei Alexandrescu
On 03/26/2011 05:26 PM, dsimcha wrote: I'm thinking about ways to make std.concurrency's model more flexible without compromising safety. It's sometimes useful to cheaply _move_ (as opposed to share or copy) data between threads. I wonder if we could co-opt sealed containers here: 1. Define basi