> On Dec 14, 2015, at 3:51 PM, James Peach <jor...@gmail.com> wrote: > > Hi all, > > I wrote some test code that was trying to drain a process::Queue. This ended > up losing values from the queue, as demonstrated by: > > TEST(QueueTest, Discard) > { > Queue<int> q; > > Future<int> get = q.get(); > EXPECT_FALSE(get.isReady()); > > get.discard(); > EXPECT_TRUE(get.hasDiscard());
Thinking about this more; simply discarding the future races with another thread putting a value into the Queue. So maybe the use cases for using Queue safely are more restrictive than I had imagined. J