/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
- /**
- 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 ) {
- callerNameSpace = this.caller.namespace;
- run() {
- this.interpreter.source( filename, callerNameSpace );
- }
- thread = new Thread( this );
- thread.start();
- return thread;
- }