Exemplo n.º 1
0
 public static void Main()
 {
     using (Worker w = new Worker())
     {
         Environment.SetEnvironmentVariable("MONO_REFLECTION_SERIALIZER", "yes");
         w.HandelMessage += Console.WriteLine;
         w.Start();
     }
 }
Exemplo n.º 2
0
 public WorkerThread(Worker parentWorker)
 {
     if (parentWorker == null) throw new ArgumentNullException("parentWorker");
     _Running = true;
     _ParentWorker = parentWorker;
     _ParentWorker.IncrementCurrentThreads();
     _InternalThread = new Thread(LogicLoop);
     _InternalThread.Start();
 }