JobJobCompleted Event |
Namespace: AGI.Parallel.Client
using System; using AGI.Parallel.Client; using AGI.Parallel.Infrastructure; namespace CodeSamples { class Program { static void Main(string[] args) { using (IJobScheduler scheduler = new ClusterJobScheduler("localhost")) { scheduler.Connect(); Job job = scheduler.CreateJob(); job.AddTask(new OurTask()); job.JobCompleted += new EventHandler<JobCompletedEventArgs>(OnJobCompletedHandler); job.Submit(); job.WaitUntilDone(); } } private static void OnJobCompletedHandler(object sender, JobCompletedEventArgs e) { Console.WriteLine("Job " + e.Job.Name + " is finished"); } } [Serializable] class OurTask : Task { public override void Execute() { } } }
STK Parallel Computing Server 2.9 API for .NET