private void HandleTask() { IProcTask task = _tasksCells.Dequeue(); task.Work(); _statistics.HandledTask++; }
public bool TryAddTaskIfEmptyCell(IProcTask task) { _statistics.InputTask++; bool isProcCanWork = isProcessorCanWork(); if (!isProcCanWork) { return(false); } if (_tasksCells.Count < _maxTask) { _tasksCells.Enqueue(task); } else { _statistics.LostedTask++; } return(true); }