Beispiel #1
0
        static void submitBlock(ReorgBlock execInfo)
        {
            string canSubmitInfo;

            if (canSubmit(execInfo.BlockName, out canSubmitInfo))
            {
                Thread execThread;
                Interlocked.Increment(ref threadsRunning);
                execThread = new Thread(new ThreadStart(execInfo.ExecuteBlock));
                execThread.Start();
            }
            else
            {
                execInfo.StatusInfo.Status = ReorgBlockStatus.Pending;
            }
            execInfo.StatusInfo.OtherStatusInfo = canSubmitInfo;
        }
Beispiel #2
0
        public static void RegisterBlockForSubmit(int id, string blockName, object[] parms)
        {
            ReorgBlock execInfo = new ReorgBlock(id, blockName, parms, new BlockEndCallback(ReorgThreadEnd), Assembly.GetCallingAssembly());
            string     sValue;

            if (Config.GetValueOf("AppMainNamespace", out sValue))
            {
                execInfo.AppNamespace = sValue;
            }

            if (!submitList.Contains(execInfo))
            {
                lock (typeof(ReorgExecute))
                {
                    submitList.Add(execInfo);
                }
            }
        }
Beispiel #3
0
 static ReorgBlockStatusInfo executeBlock(ReorgBlock execInfo)
 {
     execInfo.ExecuteBlock();
     return(execInfo.StatusInfo);
 }