Current Page: NeXtMidas Training Getting Started - Part 2 Threads in NeXtMidas Running in the Background
- - | Running in the Background (the `/BG` switch) By default, NeXtMidas commands run in the foreground (i.e. in place of the shell).
        nM> plot world.prm
  - When a command is run in the foreground, the `nM>` prompt will not return until the command is done. A NeXtMidas macro or primitive can be told to run in the background (i.e. in a separate thread) by providing the `/BG` switch.
        nM> plot/bg world.prm
When a command is run in the background, the `nM>` prompt will return once the command has started. At this time, it is possible to start another command. Pipes Another way to run commands in separate threads is by using pipes. (This will be covered in the module on Macros.)
X-Midas Users Take Note:
When the `/BG` switch is used in NeXtMidas the primitive or macro is run in a separate thread. The statement running as a "background process." is not correct, though often used. This terminology is due to the influence of X-Midas and Unix.