Results 1 to 2 of 2
I'm going to writing multi-thread/multi-process program. One thread read data from serial port. One thread, send this data to server. And main thread will initialize and monitor these two threads. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-13-2011 #1
- Join Date
- Sep 2011
what is better pthread() or exec()?
Can anyone give me some comments? Should I use pthread() or exec()? What is advantage and disadvantage of pthread() and exec().
Thanks in advance.
Last edited by asnl1987; 12-14-2011 at 03:58 AM.
- 12-14-2011 #2
This sounds a bit like a homework question, which are not allowed on this forum.
Multithreaded and multi-process applications work quite differently. In this case, it sounds like a key part of your application is sharing data between the reader part and the sender part. Although there are methods of doing inter-process communication (IPC), sharing data within a single process is generally simpler and more efficient.