コード例 #1
0
 public override void main()
 {
     // Executar Send_bins.go()
     Trace.WriteLine(Rank + ": STARTING SPLITER TARGET");
     Send_bins.go();
     Trace.WriteLine(Rank + ": FINISHING SPLITER TARGET");
 }
コード例 #2
0
        public override void main()
        {
            // 2. Criar uma thread para executar Send_bins.go()
            Task send_bins_task = new Task(delegate {
                Trace.WriteLine("BEFORE SEND BINS TASK");
                Send_bins.go();
                Trace.WriteLine("AFTER SEND BINS TASK");
            });

            // 1. Criar uma thread para executar Split_function.go();
            //Task split_function_task = new Task (delegate {
            Trace.WriteLine("BEFORE SPLIT FUNCTION TASK");
            Split_function.go();
            Trace.WriteLine("AFTER SPLIT FUNCTION TASK");
            //});

            //split_function_task.Start ();
            send_bins_task.Start();

            Trace.WriteLine(Rank + ": SPLITTER FINISH #1");
            send_bins_task.Wait();
            Trace.WriteLine(Rank + ": SPLITTER FINISH #2");
            //split_function_task.Wait ();
            Trace.WriteLine(Rank + ": SPLITTER FINISH #3");
        }