Exemple #1
0
        public void QueueBusyWork(Func<Task> taskFunc, string initiatorInfo = null, Action<Task> continueWith = null)
        {
            if (_disposed)
                return;

            if (taskFunc == null)
                return;

            var item = new WorkQueueItem(taskFunc, initiatorInfo, continueWith);

            _tasksToRun.Enqueue(item);
            StartWorkerThread();
        }
Exemple #2
0
        public void QueueBusyWork(Func <Task> taskFunc, string initiatorInfo = null, Action <Task> continueWith = null)
        {
            if (_disposed)
            {
                return;
            }

            if (taskFunc == null)
            {
                return;
            }

            var item = new WorkQueueItem(taskFunc, initiatorInfo, continueWith);

            _tasksToRun.Enqueue(item);
            StartWorkerThread();
        }