Ejemplo n.º 1
0
        internal InternalScheduler(
            ObjectStore objectStore,
            ReadyToSchedules readyToSchedules,
            SynchronizationQueue synchronizationQueue,
            Engine engine,
            bool detectCircularDependencies)
        {
            _objectStore = objectStore;

            _readyToSchedules = readyToSchedules;

            _synchronizationQueue = synchronizationQueue;
            _engine = engine;
            _detectCircularDependencies = detectCircularDependencies;
        }
        public static Engine StartNew(IStorageEngine storageEngine, bool detectCircularDependencies)
        {
            var syncs = new SynchronizationQueue();

            var objectStore = ObjectStore.New(storageEngine);

            var readyToSchedules = new ReadyToSchedules();

            var engineScheduler = new Engine();
            var scheduler       = new InternalScheduler(objectStore, readyToSchedules, syncs, engineScheduler, detectCircularDependencies);

            engineScheduler.Scheduler = scheduler;

            objectStore.Entangle(readyToSchedules);

            scheduler.Start();

            return(engineScheduler);
        }
Ejemplo n.º 3
0
 internal void MoveAllTo(ReadyToSchedules rts) => rts.MoveAllFrom(_callbacks);