Пример #1
0
            public RunnerData(bool relaxed, float interval, string name, bool isRunningTightTasks,
                              TFlowModifier modifier)
            {
                _mevent              = new ManualResetEventEx();
                _watch               = new Stopwatch();
                _coroutines          = new FasterList <TTask>();
                newTaskRoutines      = new ThreadSafeQueue <TTask>();
                _interval            = (long)(interval * 10000);
                this.name            = name;
                _isRunningTightTasks = isRunningTightTasks;
                _flushingOperation   = new CoroutineRunner <TTask> .FlushingOperation();

                modifier.runnerName = name;
                _process            = new CoroutineRunner <TTask> .Process <TFlowModifier>
                                          (newTaskRoutines, _coroutines, _flushingOperation, modifier);

                if (relaxed)
                {
                    _lockingMechanism = RelaxedLockingMechanism;
                }
                else
                {
                    _lockingMechanism = QuickLockingMechanism;
                }
            }
Пример #2
0
            public RunnerData(string name, TFlowModifier modifier) : this()
            {
                _coroutines        = new FasterList <TTask>();
                newTaskRoutines    = new ThreadSafeQueue <TTask>();
                this.name          = name;
                _flushingOperation = new CoroutineRunner <TTask> .FlushingOperation();

                modifier.runnerName = name;
                _process            = new CoroutineRunner <TTask> .Process <TFlowModifier, PlatformProfilerMT>
                                          (newTaskRoutines, _coroutines, _flushingOperation, modifier);
            }