PageRenderTime 5ms CodeModel.GetById 2ms app.highlight 0ms RepoModel.GetById 2ms app.codeStats 0ms

/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
 1
 2bsh.help.run= "usage: Thread bg( filename )";
 3//import bsh.NameSpace;
 4
 5/**
 6	Source a command in its own thread in the caller's namespace
 7*/
 8Thread bg( String filename ) {
 9
10	callerNameSpace = this.caller.namespace;
11	run() {
12	/*
13	used to be subordinate namespace
14		ns = new NameSpace( 
15			this.caller.namespace, 
16			"Running command: "+filename, super.interpreter );
17	*/
18		this.interpreter.source( filename, callerNameSpace );
19	}
20
21	thread = new Thread( this );
22	thread.start();
23	return thread;
24}