private async void Loop() { SolutionPushModel spush; while (_queue.TryTake(out spush, 500)) { try { var ps = new JudgeProcess(spush); await ps.ExecuteAsync(); } catch (Exception e) { _log.FatalExt(() => e.Message); throw; } } _task = null; }
static void Main(string[] args) { int uid, pid, std_test_num; try { uid = int.Parse(args[0]); pid = int.Parse(args[1]); std_test_num = int.Parse(args[2]); } catch { Console.WriteLine("Invalid Parameter."); return; } JudgeProcess judge = new JudgeProcess(uid, pid, std_test_num); judge.shell = "sh"; judge.DoJudge(); }
public MainWindow() { InitializeComponent(); choseList.SelectedIndex = 0; jp = new JudgeProcess(ConfigurationService.GetRoot()); }