예제 #1
0
        public bool RunParallel(Expression <Action> EAMethod, int interval, int delay, string ID, bool waitForAccess)
        {
            if (System.String.IsNullOrEmpty(ID))
            {
                ID = Expressions.nameofFull(EAMethod);
            }

            return(Methods.Run(() => this.Run(EAMethod, interval, ID, waitForAccess, true), ID, delay, true, true));
        }
예제 #2
0
        public bool Run(Expression <Action> EAMethod, int interval, int delay, string ID, bool waitForAccess)
        {
            if (System.String.IsNullOrEmpty(ID))
            {
                ID = Expressions.nameofFull(EAMethod);
            }

            if (Threads == null)
            {
                Threads = new ThreadedMethod(this.MaxThreadsCount, ThreadPriority.Lowest, 1);
            }


            Threads.Run(() => this.Run(EAMethod, interval, ID, waitForAccess), ID, delay, true, true, false);

            return(false);
        }