Esempio n. 1
0
 public AltVAsync()
 {
     mainThread      = Thread.CurrentThread;
     mainThread.Name = "main";
     scheduler       = new TickScheduler(mainThread);
     taskFactory     = new TaskFactory(
         CancellationToken.None, TaskCreationOptions.DenyChildAttach,
         TaskContinuationOptions.None, scheduler);
     AltAsync.Setup(this);
 }
Esempio n. 2
0
        public AltVAsync(ITickSchedulerFactory tickSchedulerFactory)
        {
            mainThread = Thread.CurrentThread;
            if (mainThread.Name == "")
            {
                mainThread.Name = "main";
            }

            scheduler   = tickSchedulerFactory.Create(mainThread);
            taskFactory = new TaskFactory(
                CancellationToken.None, TaskCreationOptions.DenyChildAttach,
                TaskContinuationOptions.None, scheduler);
            AltAsync.Setup(this);
            TickDelegate = FirstTick;
        }