summaryrefslogtreecommitdiff
path: root/jstests/parallel
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2009-12-29 17:29:24 -0800
committerAaron <aaron@10gen.com>2009-12-29 17:29:24 -0800
commitaece98652ee7284357a7e729ae2ee21aee259fe5 (patch)
tree147730f97fb66712efdbb2eebcec0a86dc701ce4 /jstests/parallel
parent24169676c46d8fd8d996d81f628f2d76c60425d9 (diff)
downloadmongo-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.js11
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