Then why did you write (in the portion you snipped)
> [...] I have to pause the entire process
> means the main thread as well as all the other child thread(s)
> that are running [...]
? No, don't answer: It's what we call a "rhetorical question,"
intended not to gather information from you but to draw your
attention to some point. And the point I'm trying to highlight
is that you seem quite confused about your own requirements: You
don't really appear to know what you want to do. You have gone
from an foggy idea of your strategic goal to a concrete question
about a particular tactic you sort of think might be useful in
some way you don't quite comprehend ...
There was once a newspaper comic strip featuring a bratty
little boy who asked his mother "Do we have any chain saws?"
"No, why?" she replied. "Shucks!" said he, "How am I going to
learn to juggle?"
Wasim, your situation is a little bit like that of the boy
in the comic strip: You have gotten far ahead of yourself, and
you need to go back and pay attention to the fundamentals. In
the case at hand, you need to make some decisions about program
structure (are you using one process with multiple threads, or
multiple processes with one thread each, or multiple processes
with multiple threads each), and about implementation (are you
in a position to insert code into these threads you'd like to
make idle, or are they "uncooperative"), and so on. Suspending
a thread without its cooperation is dangerous -- like juggling
chain saws, it's not the place to start. Seek alternatives.