internal void InitializeItem(QueueProcessor processor, ItemQueue queue) { if (Interlocked.CompareExchange(ref isInitialized, 1, 0) == 0) { this.processor = processor; this.queue = queue; } }
private ItemQueue GetQueue(QueueItemType type) { lock (queueCreationLocker) { ItemQueue queue; if (!queuesByType.TryGetValue(type, out queue)) { queue = new ItemQueue(this, type); queues = queues.Add(queue); queuesByType = queuesByType.Add(type, queue); } return(queue); } }