Exemplo n.º 1
0
        internal void Add( Process process )
        {
            int priority = process.priority;
            if(!mProcesses.ContainsKey(priority))
                mProcesses.Add(priority, new List<Process>());
            if(!mProcesses[priority].Contains(process))
                mProcesses[priority].Add(process);

            // snip linked list implimentation
        }
Exemplo n.º 2
0
        internal void Remove( Process process )
        {
            int priority = process.priority;
            if(mProcesses.ContainsKey(priority)) {
                mProcesses[priority].Remove(process);
                if(mProcesses[priority].Count == 0)
                    mProcesses.Remove(priority);
            }

            // snip linked list implimentation
        }