/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
- 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;
- }