home *** CD-ROM | disk | FTP | other *** search
/ Freelog Special Freeware 25 / FreelogHS25.iso / Dessin / ArtOfIllusion2.2.1 / ArtOfIllusion.jar / bsh / commands / bg.bsh < prev    next >
Text File  |  2005-05-23  |  488b  |  23 lines

  1. /**
  2.     Source a command in its own thread in the caller's namespace
  3.     <p>
  4.  
  5.     This is like run() except that it runs the command in its own thread.  
  6.     Returns the Thread object control.
  7.     @method Thread bg( String filename )
  8. */
  9.  
  10. bsh.help.run= "usage: Thread bg( filename )";
  11.  
  12. Thread bg( String filename ) 
  13. {
  14.     this.callerNameSpace = this.caller.namespace;
  15.     run() {
  16.         this.interpreter.source( filename, callerNameSpace );
  17.     }
  18.  
  19.     this.thread = new Thread( this );
  20.     thread.start();
  21.     return thread;
  22. }
  23.