PageRenderTime 97ms CodeModel.GetById 94ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 1/**
 2	Source a command in its own thread in the caller's namespace
 3	<p>
 4
 5	This is like run() except that it runs the command in its own thread.  
 6	Returns the Thread object control.
 7	@method Thread bg( String filename )
 8*/
 9
10bsh.help.run= "usage: Thread bg( filename )";
11
12Thread bg( String filename ) 
13{
14	this.callerNameSpace = this.caller.namespace;
15	run() {
16		this.interpreter.source( filename, callerNameSpace );
17	}
18
19	this.thread = new Thread( this );
20	thread.start();
21	return thread;
22}