@@ -7,8 +7,6 | |||
|
7 | 7 | <OutputType>Library</OutputType> |
|
8 | 8 | <RootNamespace>Implab</RootNamespace> |
|
9 | 9 | <AssemblyName>Implab</AssemblyName> |
|
10 | <ProductVersion>8.0.30703</ProductVersion> | |
|
11 | <SchemaVersion>2.0</SchemaVersion> | |
|
12 | 10 | </PropertyGroup> |
|
13 | 11 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|
14 | 12 | <DebugSymbols>true</DebugSymbols> |
@@ -44,6 +44,10 namespace Implab.Parallels { | |||
|
44 | 44 | get { return m_hi; } |
|
45 | 45 | } |
|
46 | 46 | |
|
47 | public int Size { | |
|
48 | get { return m_size; } | |
|
49 | } | |
|
50 | ||
|
47 | 51 | public bool TryEnqueue(T value, out bool extend) { |
|
48 | 52 | var alloc = Interlocked.Increment(ref m_alloc) - 1; |
|
49 | 53 | |
@@ -562,9 +566,15 namespace Implab.Parallels { | |||
|
562 | 566 | m_pos = m_current.Low; |
|
563 | 567 | else |
|
564 | 568 | m_pos++; |
|
569 | ||
|
565 | 570 | if (m_pos == m_current.Hi) { |
|
571 | ||
|
572 | m_current = m_pos == m_current.Size ? m_current.next : null; | |
|
573 | ||
|
566 | 574 | m_pos = 0; |
|
567 | m_current = m_current.next; | |
|
575 | ||
|
576 | if (m_current == null) | |
|
577 | return false; | |
|
568 | 578 | } |
|
569 | 579 | |
|
570 | 580 | return true; |
General Comments 0
You need to be logged in to leave comments.
Login now