1 Replies - 246 Views - Last Post: 19 November 2012 - 01:25 PM Rate Topic: -----

#1 liquidseason  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 19-November 12

C# Threading question.

Posted 19 November 2012 - 12:23 PM

I am working on a simple form application which uses threading and HTTP-web[request/response]. When i click the START button the thread starts.
// Button START click event

Thread thrd = new Thread(new ThreadStart(startAction));
            
            if (thrd.IsAlive)
            {
                thrd.Join();
                return;
            }
            else
            {
                thrd.Start();
            }



When the action is complete i made a messagebox to inform that the action has been completed.

Without closing the form if i re-run the action, it works halfway and stops. When the action is again re-run for third time it doesn't work at all. What could be the problem?

Is This A Good Question/Topic? 0
  • +

Replies To: C# Threading question.

#2 Momerath  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1010
  • View blog
  • Posts: 2,444
  • Joined: 04-October 09

Re: C# Threading question.

Posted 19 November 2012 - 01:25 PM

Impossible to tell as you haven't provided the code for 'startAction'.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1