Wednesday, May 2, 2012

BlockingCollection auto executes my functions when I attempt to add them to list

            var tasks0 = new BlockingCollection<object>(new ConcurrentQueue<object>());
tasks0.Add(Fetch(APCounter));
tasks0.Add(Decode(APCounter));
tasks0.Add(ALURes(APCounter));
tasks0.Add(Memory(APCounter));
tasks0.Add(WriteB(APCounter));


var tasks1 = new BlockingCollection<object>(new ConcurrentQueue<object>());
tasks1.Add(Fetch(APCounter+1));
tasks1.Add(Decode(APCounter + 1));
tasks1.Add(ALURes(APCounter + 1));
tasks1.Add(Memory(APCounter + 1));
tasks1.Add(WriteB(APCounter + 1));


I don't want it execute the functions being added now. I'll do that manually later using the business logic. !!!





No comments:

Post a Comment