Link to home
Start Free TrialLog in
Avatar of PhilC
PhilC

asked on

threading lockup

I have a main form appliction that  creates a threadon in it's Load() function
myThread=newThread(new ThreadStart(myThreadFunction);
myThread.Start();

The thread creates a tcpListener objects and creates another form on connection
new tcpipObject(myListener.AcceptSocket(),this)

tcpipObject is a System.Windows.Forms.Form that creates another thread in it's constructor
secondThread = new Thread(new ThreadStart(secondThreadFunction);
secondThread.Start();
this.Show();

In secondThreadFunction() I have a view only multiline text box named textboxStatus
textBoxStatus.Text += "Connection Made\r\n";

using the debugger I get to this line, but an F10 does not move to the next line.

Is there something ovbious that I am doing incorrectly?
Thank You
ASKER CERTIFIED SOLUTION
Avatar of AlexFM
AlexFM

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AlexFM
AlexFM

By the way, all .NET networking classes may work in asynchronous mode, allowing to write single-threaded applications. All required worker threads are created internally, and callback functions are always called in the main thread.