mono/mono — pull request #932 by exony-craigminihan (2014-03-05 15:33:35+00:00)
Title: [Fix] Bugzilla #18182 - ConcurrentQueue<T>.TryPeek() is not thread safe

- in the previous version the IsEmpty could be false, but by the time we get
to head.Next.Value we get an exception since Value is now null
- passes existing test cases, although these are not definitive since
they don't show threading issue
- would need to adapt System.Threading.Tasks.ParallelTestHelper to allow
TryPeek() to be called during Enqueue/Dequeue operations to truly
test this change out