Click here to Skip to main content
15,891,375 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hey!
I'm newbie to programming. My new program has 4 functions Lets say funcA(),funcB(),funcC() and funcD(). funcA() is used to read serial port. funcA() constantly reads a status of certain device and status becomes YES funcA() calls funcB(),funcC() and funcD() respectively. funcB(),funcC() and funcD() takes little time to get executed. During that period the funcA() stops reading status from serial port. So What i need to do is keep funcA() independent of other functions and keep reading serial port and save it buffer. How can i do it?? Any help is appreciated... THANK YOU...
Posted
Comments
[no name] 5-Apr-13 6:05am    
It's called "threading"

1 solution

Hi Sharath,

As ThePhantomUpvoter suggested look into threading. I'd recommend Asynchronous programming or Background Workers too. You should be getting a fair knowledge about each of these by reading below links. Pick 1 to your liking :)

Threading C#[^]
Calling Synchronous Methods Asynchronously[^]
BackgroundWorker Class[^]

Hope this helps, regards
Pasan
 
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