PageRenderTime 40ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
Unknown | 24 lines | 20 code | 4 blank | 0 comment | 0 complexity | 28118884e16a538c7fd9aed0600f0eff 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. bsh.help.run= "usage: Thread bg( filename )";
  2. //import bsh.NameSpace;
  3. /**
  4. Source a command in its own thread in the caller's namespace
  5. */
  6. Thread bg( String filename ) {
  7. callerNameSpace = this.caller.namespace;
  8. run() {
  9. /*
  10. used to be subordinate namespace
  11. ns = new NameSpace(
  12. this.caller.namespace,
  13. "Running command: "+filename, super.interpreter );
  14. */
  15. this.interpreter.source( filename, callerNameSpace );
  16. }
  17. thread = new Thread( this );
  18. thread.start();
  19. return thread;
  20. }