diff options
author | Aaron <aaron@10gen.com> | 2009-12-29 17:29:24 -0800 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2009-12-29 17:29:24 -0800 |
commit | aece98652ee7284357a7e729ae2ee21aee259fe5 (patch) | |
tree | 147730f97fb66712efdbb2eebcec0a86dc701ce4 /jstests/parallel | |
parent | 24169676c46d8fd8d996d81f628f2d76c60425d9 (diff) | |
download | mongo-aece98652ee7284357a7e729ae2ee21aee259fe5.tar.gz |
SERVER-470 allow shell threads to be run in fresh scopes
Diffstat (limited to 'jstests/parallel')
-rw-r--r-- | jstests/parallel/shellfork.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/jstests/parallel/shellfork.js b/jstests/parallel/shellfork.js index 27379506ec3..20a1d3df786 100644 --- a/jstests/parallel/shellfork.js +++ b/jstests/parallel/shellfork.js @@ -20,3 +20,14 @@ z = fork( function( a ) { }, 1 ); z.start(); assert.eq( 7, z.returnData() ); + + +t = 1; +z = new ScopedThread( function() { + assert( typeof( t ) == "undefined", "t not undefined" ); + t = 5; + return t; + } ); +z.start(); +assert.eq( 5, z.returnData() ); +assert.eq( 1, t );
\ No newline at end of file |