source: trunk/j/src/bsh/commands/bg.bsh @ 2

Last change on this file since 2 was 2, checked in by piso, 18 years ago

Initial checkin.

File size: 495 bytes
Line 
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}
Note: See TracBrowser for help on using the repository browser.