Exemple #1
0
        public bool Create(int processId)
        {
            ProcessRecord process = new ProcessRecord(processId, logger, () => GarbageCollectProcess(processId));

            lock (processTable)
            {
                if (processTable.ContainsKey(processId))
                {
                    return(false);
                }

                processTable.Add(processId, process);
            }

            return(true);
        }
        public bool Create(int processId)
        {
            ProcessRecord process = new ProcessRecord(processId, logger, () => GarbageCollectProcess(processId));

            lock (processTable)
            {
                if (processTable.ContainsKey(processId))
                {
                    return false;
                }

                processTable.Add(processId, process);
            }

            return true;
        }