Click here to Skip to main content
15,921,226 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I made a project which has many forms and I need to perform reading from OPC server continously, so what I do is create a thread for reading, and use these read data in the main form.
I do not know how to use the thread.
Posted
Updated 25-Jun-11 15:33pm
v2
Comments
OriginalGriff 25-Jun-11 4:46am    
You might have to be more specific: What have you tried? How is it giving you problems?
Use the "Improve question" widget to edit your question and give use more information, with a small code fragment if possible.

When I started learning threads I fist learnt how to use Backgroundworker[^] and then moved onto system.thread.threads
 
Share this answer
 
Over 1.6 MILLION Google results for "c# multithreading"[^]

The very first link is a free eBook discussing C# multithreading.
 
Share this answer
 
Please see my collection of references to my past answers on threading:
How to get a keydown event to operate on a different thread in vb.net[^],
Control events not firing after enable disable + multithreading[^].

Please pay attention where I advise to create a permanent additional thread(s) (so, not BackgroundWorker) from the very beginning and keep it throttled using EventWaitHandle, blocking operations or blocking Queue — this is all applicable to your case.

—SA
 
Share this answer
 
I would say one at a time, but I guess the correct answer to the question 'how should I deal with threads' is, all at once.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900