working on dynamic wrapping
This commit is contained in:
@@ -92,7 +92,8 @@ namespace StgSharp
|
||||
if (stack.TryPop(out int v))
|
||||
{
|
||||
popped.Add(v);
|
||||
Console.WriteLine($"pop: {v}");
|
||||
|
||||
// Console.WriteLine($"pop: {v}");
|
||||
} else
|
||||
{
|
||||
Thread.Yield();
|
||||
@@ -111,7 +112,7 @@ namespace StgSharp
|
||||
ready.Signal();
|
||||
startGate.Wait();
|
||||
|
||||
int begin = captured * perProducer;
|
||||
int begin = captured * perProducer + 10 * perProducer;
|
||||
for (int j = 0; j < perProducer; j++)
|
||||
{
|
||||
stack.Push(begin + j);
|
||||
@@ -146,12 +147,13 @@ namespace StgSharp
|
||||
}
|
||||
|
||||
// Gather remaining data
|
||||
List<int> remaining = new System.Collections.Generic.List<int>();
|
||||
List<int> remaining = [];
|
||||
while (stack.TryPop(out int value)) {
|
||||
remaining.Add(value);
|
||||
}
|
||||
|
||||
Console.WriteLine($"Popped count: {popped.Count}");
|
||||
/**/
|
||||
Console.WriteLine("Popped values:");
|
||||
foreach (int v in popped)
|
||||
{
|
||||
@@ -159,7 +161,7 @@ namespace StgSharp
|
||||
Console.Write('\t');
|
||||
}
|
||||
Console.WriteLine();
|
||||
|
||||
/**/
|
||||
Console.WriteLine($"Remaining count: {remaining.Count}");
|
||||
Console.WriteLine("Remaining values:");
|
||||
foreach (int v in remaining)
|
||||
|
||||
Reference in New Issue
Block a user