[Mono-list] Threading

Jonathan Stowe gellyfish@gellyfish.com
Sun, 12 May 2002 13:09:17 +0100 (BST)


Before I bugzilla this is there anything fundamentally wrong with :

namespace Gellyfish
{
   using System;
   using System.Threading;

   class TestThread
   {

      public TestThread()
      {
         Console.WriteLine("In Constructor");
         try
         {

            Thread th = new Thread(new ThreadStart(DoThread));
            th.Start();
         }
         catch(Exception e)
         {
            Console.WriteLine("Listening :" + e.ToString());
         }
      }

      private void DoThread()
      {
            Console.WriteLine("In DoThread");
      }

      public static void Main()
      {
         TestThread theThread = new TestThread();
      }
   }
}

I am expecting it to run DoThread() ...

/J\
-- 
Jonathan Stowe                      |
<http://www.gellyfish.com>          |      This space for rent
                                    |