Previous Next        Current Page: NeXtMidas Training / Getting Started - Part 2 / Threads in NeXtMidas / Running in the Background
back
+ Start Here   
+ Background   
+ Common Midas Concepts   
+ Getting Started - Part 1   
- Getting Started - Part 2   
   + Advanced Results Parameters   
   + Lab 3   
   - Threads in NeXtMidas   
      - Threads vs Processes   
      - Running in the Background   
      - Registry   
   + Lab 4   
+ Working with Files   
+ Option Trees   
+ Macros - Part 1 (Basics)   
+ Macros - Part 2 (Graphics)   
+ NetBeans - Part 1 (Setup)   
+ NetBeans - Part 2 (GUIs)   
+ NetBeans - Part 3 (Profiler)   
+ Eclipse - Part 1 (Setup)   
+ Eclipse - Part 2 (GUIs)   
+ Primitives   
+ WebStart   
+ Maps & Imagery   
+ X-Midas Interoperability   
+ RMIF & Remoting   
+ Installing NeXtMidas   
+ Support & Maintenance   
+ File Handlers   


  • 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.

back