PageRenderTime 48ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/jEdit/tags/jedit-4-1-pre5/bsh/commands/bg.bsh

#
Unknown | 22 lines | 17 code | 5 blank | 0 comment | 0 complexity | 533852cda498bc922fbfe0c543b6e429 MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  1. /**
  2. Source a command in its own thread in the caller's namespace
  3. <p>
  4. This is like run() except that it runs the command in its own thread.
  5. Returns the Thread object control.
  6. @method Thread bg( String filename )
  7. */
  8. bsh.help.run= "usage: Thread bg( filename )";
  9. Thread bg( String filename ) {
  10. callerNameSpace = this.caller.namespace;
  11. run() {
  12. this.interpreter.source( filename, callerNameSpace );
  13. }
  14. thread = new Thread( this );
  15. thread.start();
  16. return thread;
  17. }