/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
- bsh.help.run= "usage: Thread bg( filename )";
- //import bsh.NameSpace;
- /**
- Source a command in its own thread in the caller's namespace
- */
- Thread bg( String filename ) {
- callerNameSpace = this.caller.namespace;
- run() {
- /*
- used to be subordinate namespace
- ns = new NameSpace(
- this.caller.namespace,
- "Running command: "+filename, super.interpreter );
- */
- this.interpreter.source( filename, callerNameSpace );
- }
- thread = new Thread( this );
- thread.start();
- return thread;
- }