There aren't really any threads involved here; the command you run will be in a separate process.
These posts may be useful, if the aim is to run a command and capture its output:
There aren't really any threads involved here; the command you run will be in a separate process.
These posts may be useful, if the aim is to run a command and capture its output: