In my windows based c++ application to imports, multiple threads are created. My application does not thread safe and not even synchronized. So is it possible to run the thread as a process?
Asked
Active
Viewed 176 times
-1
-
3What would that achieve? Cross-process synchronization is even more difficult. – GSerg Nov 22 '18 at 09:17
-
as per my requirement, I don't have to share the data between these 2 processes. I am working on a POC to see how feasible is that? – sarita mishra Nov 22 '18 at 09:28
-
1If you already have problems because of unsynchronized threads, you will instead have problems because of unsynchronized processes. If you don't have problems and the threads do not have to be synchronized to begin with, and you want to have several processes for simplicity and stability, e.g. so that the OS can kill some of your processes when appropriate, then okay, [do that](https://stackoverflow.com/q/2618285/11683). – GSerg Nov 22 '18 at 09:32
-
Thanks a ton, will try that. – sarita mishra Nov 22 '18 at 09:39
1 Answers
0
A process can be thought of as a container for threads (sometimes single-threaded though). The platform already handles it for you.
You asked:
So is it possible to run the thread as a process?
Not directly or without some work involved. But what difference does it make to you if you run one process with a bunch of threads or multiple processes with one threads.

darune
- 10,480
- 2
- 24
- 62
-
I am working on a POC for my project to find out all these issues. That's why I am looking for this solution. – sarita mishra Nov 22 '18 at 09:44