/jEdit/tags/jedit-4-5-pre1/org/gjt/sp/jedit/bsh/commands/bg.bsh
# · Unknown · 22 lines · 18 code · 4 blank · 0 comment · 0 complexity · 3fe36fe0d3cabb06fd5bf378755915ed MD5 · raw file
- /**
- Source a command in its own thread in the caller's namespace
- <p>
- This is like run() except that it runs the command in its own thread.
- Returns the Thread object control.
- @method Thread bg( String filename )
- */
- bsh.help.run= "usage: Thread bg( filename )";
- Thread bg( String filename )
- {
- this.callerNameSpace = this.caller.namespace;
- run() {
- this.interpreter.source( filename, callerNameSpace );
- }
- this.thread = new Thread( this );
- thread.start();
- return thread;
- }