PageRenderTime 22ms CodeModel.GetById 18ms app.highlight 3ms RepoModel.GetById 1ms 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
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
 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}