G
Guest
Hello,
I am developing a TCP/IP Client application in Windows Forms (.NET)
template. I use one MDI form as initial form where I connect to server and
starts a background thread (thread_A) for receiving data. Here, I use the
Socket_A
By clicking a toolbarbutton, I send a command to server. If it is
successfull, I opened the MDI-Child form with "frmChildForm->Show();" command.
I create two more sockets (Socket_B, Socket_C) at child form and start
receiving continuously (in while-loops) with two threads (Thread_B,
Thread_C). I display the data coming from these sockets on 25 textboxes
(Thread_B with Socket_B) and on 3 data-grids (Thread_C with Socket_C). These
operations must be as fast as possible. Thread_B and Thread_C are not sharing
any data, they are independent.
I could not speed up the data-receving which means I could not order Threads.
I read several documents at MSDN like ThreadPool, Monitor. But I could not
solve my problem. I put several "Thread::Sleep(...);" in Thread_B and
Thread_C, but it is not still working properly. Data on textboxes and
datagrids are not changing fast, sometimes some values are stucking.
I am requesting a way to make use of Threads more efficiently.?
I thank you so much in advance.
--
İyi Çalışmalar
Alper AKÇAYÖZ (Bil Muh)
Wish You Good Work
Alper AKCAYOZ (Bil Muh)
I am developing a TCP/IP Client application in Windows Forms (.NET)
template. I use one MDI form as initial form where I connect to server and
starts a background thread (thread_A) for receiving data. Here, I use the
Socket_A
By clicking a toolbarbutton, I send a command to server. If it is
successfull, I opened the MDI-Child form with "frmChildForm->Show();" command.
I create two more sockets (Socket_B, Socket_C) at child form and start
receiving continuously (in while-loops) with two threads (Thread_B,
Thread_C). I display the data coming from these sockets on 25 textboxes
(Thread_B with Socket_B) and on 3 data-grids (Thread_C with Socket_C). These
operations must be as fast as possible. Thread_B and Thread_C are not sharing
any data, they are independent.
I could not speed up the data-receving which means I could not order Threads.
I read several documents at MSDN like ThreadPool, Monitor. But I could not
solve my problem. I put several "Thread::Sleep(...);" in Thread_B and
Thread_C, but it is not still working properly. Data on textboxes and
datagrids are not changing fast, sometimes some values are stucking.
I am requesting a way to make use of Threads more efficiently.?
I thank you so much in advance.
--
İyi Çalışmalar
Alper AKÇAYÖZ (Bil Muh)
Wish You Good Work
Alper AKCAYOZ (Bil Muh)